Module swim.runtime

Class ListDownlinkView<V>

  • All Implemented Interfaces:
    Iterable<V>, Collection<V>, List<V>, swim.api.Downlink, swim.api.downlink.ListDownlink<V>, swim.api.Link, swim.api.warp.WarpDownlink, swim.api.warp.WarpLink, swim.observable.Observable<Object>, swim.observable.ObservableList<V>, swim.util.KeyedList<V>, swim.util.Log

    public class ListDownlinkView<V>
    extends WarpDownlinkView
    implements swim.api.downlink.ListDownlink<V>
    • Constructor Detail

      • ListDownlinkView

        public ListDownlinkView​(CellContext cellContext,
                                swim.concurrent.Stage stage,
                                swim.uri.Uri meshUri,
                                swim.uri.Uri hostUri,
                                swim.uri.Uri nodeUri,
                                swim.uri.Uri laneUri,
                                float prio,
                                float rate,
                                swim.structure.Value body,
                                int flags,
                                swim.structure.Form<V> valueForm,
                                Object observers)
      • ListDownlinkView

        public ListDownlinkView​(CellContext cellContext,
                                swim.concurrent.Stage stage,
                                swim.uri.Uri meshUri,
                                swim.uri.Uri hostUri,
                                swim.uri.Uri nodeUri,
                                swim.uri.Uri laneUri,
                                float prio,
                                float rate,
                                swim.structure.Value body,
                                swim.structure.Form<V> valueForm)
    • Method Detail

      • hostUri

        public ListDownlinkView<V> hostUri​(swim.uri.Uri hostUri)
        Specified by:
        hostUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        hostUri in interface swim.api.warp.WarpDownlink
        Specified by:
        hostUri in class WarpDownlinkView
      • hostUri

        public ListDownlinkView<V> hostUri​(String hostUri)
        Specified by:
        hostUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        hostUri in interface swim.api.warp.WarpDownlink
        Specified by:
        hostUri in class WarpDownlinkView
      • nodeUri

        public ListDownlinkView<V> nodeUri​(swim.uri.Uri nodeUri)
        Specified by:
        nodeUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        nodeUri in interface swim.api.warp.WarpDownlink
        Specified by:
        nodeUri in class WarpDownlinkView
      • nodeUri

        public ListDownlinkView<V> nodeUri​(String nodeUri)
        Specified by:
        nodeUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        nodeUri in interface swim.api.warp.WarpDownlink
        Specified by:
        nodeUri in class WarpDownlinkView
      • laneUri

        public ListDownlinkView<V> laneUri​(swim.uri.Uri laneUri)
        Specified by:
        laneUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        laneUri in interface swim.api.warp.WarpDownlink
        Specified by:
        laneUri in class WarpDownlinkView
      • laneUri

        public ListDownlinkView<V> laneUri​(String laneUri)
        Specified by:
        laneUri in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        laneUri in interface swim.api.warp.WarpDownlink
        Specified by:
        laneUri in class WarpDownlinkView
      • prio

        public ListDownlinkView<V> prio​(float prio)
        Specified by:
        prio in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        prio in interface swim.api.warp.WarpDownlink
        Specified by:
        prio in class WarpDownlinkView
      • rate

        public ListDownlinkView<V> rate​(float rate)
        Specified by:
        rate in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        rate in interface swim.api.warp.WarpDownlink
        Specified by:
        rate in class WarpDownlinkView
      • body

        public ListDownlinkView<V> body​(swim.structure.Value body)
        Specified by:
        body in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        body in interface swim.api.warp.WarpDownlink
        Specified by:
        body in class WarpDownlinkView
      • keepLinked

        public ListDownlinkView<V> keepLinked​(boolean keepLinked)
        Specified by:
        keepLinked in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        keepLinked in interface swim.api.warp.WarpDownlink
        Specified by:
        keepLinked in class WarpDownlinkView
      • keepSynced

        public ListDownlinkView<V> keepSynced​(boolean keepSynced)
        Specified by:
        keepSynced in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        keepSynced in interface swim.api.warp.WarpDownlink
        Specified by:
        keepSynced in class WarpDownlinkView
      • isStateful

        public final boolean isStateful()
        Specified by:
        isStateful in interface swim.api.downlink.ListDownlink<V>
      • isStateful

        public ListDownlinkView<V> isStateful​(boolean isStateful)
        Specified by:
        isStateful in interface swim.api.downlink.ListDownlink<V>
      • valueForm

        public final swim.structure.Form<V> valueForm()
        Specified by:
        valueForm in interface swim.api.downlink.ListDownlink<V>
      • valueForm

        public <V2> ListDownlinkView<V2> valueForm​(swim.structure.Form<V2> valueForm)
        Specified by:
        valueForm in interface swim.api.downlink.ListDownlink<V>
      • valueClass

        public <V2> ListDownlinkView<V2> valueClass​(Class<V2> valueClass)
        Specified by:
        valueClass in interface swim.api.downlink.ListDownlink<V>
      • typesafeObservers

        protected Object typesafeObservers​(Object observers)
      • observe

        public ListDownlinkView<V> observe​(Object observer)
        Specified by:
        observe in interface swim.api.Downlink
        Specified by:
        observe in interface swim.api.Link
        Specified by:
        observe in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        observe in interface swim.observable.Observable<V>
        Specified by:
        observe in interface swim.observable.ObservableList<V>
        Specified by:
        observe in interface swim.api.warp.WarpDownlink
        Overrides:
        observe in class WarpDownlinkView
      • unobserve

        public ListDownlinkView<V> unobserve​(Object observer)
        Specified by:
        unobserve in interface swim.api.Downlink
        Specified by:
        unobserve in interface swim.api.Link
        Specified by:
        unobserve in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        unobserve in interface swim.observable.Observable<V>
        Specified by:
        unobserve in interface swim.observable.ObservableList<V>
        Specified by:
        unobserve in interface swim.api.warp.WarpDownlink
        Overrides:
        unobserve in class WarpDownlinkView
      • willMove

        public swim.api.downlink.ListDownlink<V> willMove​(swim.observable.function.WillMoveIndex<V> willMove)
        Specified by:
        willMove in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willMove in interface swim.observable.ObservableList<V>
      • didMove

        public swim.api.downlink.ListDownlink<V> didMove​(swim.observable.function.DidMoveIndex<V> didMove)
        Specified by:
        didMove in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didMove in interface swim.observable.ObservableList<V>
      • willUpdate

        public ListDownlinkView<V> willUpdate​(swim.observable.function.WillUpdateIndex<V> willUpdate)
        Specified by:
        willUpdate in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willUpdate in interface swim.observable.ObservableList<V>
      • didUpdate

        public ListDownlinkView<V> didUpdate​(swim.observable.function.DidUpdateIndex<V> didUpdate)
        Specified by:
        didUpdate in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didUpdate in interface swim.observable.ObservableList<V>
      • willRemove

        public ListDownlinkView<V> willRemove​(swim.observable.function.WillRemoveIndex willRemove)
        Specified by:
        willRemove in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willRemove in interface swim.observable.ObservableList<V>
      • didRemove

        public ListDownlinkView<V> didRemove​(swim.observable.function.DidRemoveIndex<V> didRemove)
        Specified by:
        didRemove in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didRemove in interface swim.observable.ObservableList<V>
      • willDrop

        public ListDownlinkView<V> willDrop​(swim.observable.function.WillDrop willDrop)
        Specified by:
        willDrop in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willDrop in interface swim.observable.ObservableList<V>
      • didDrop

        public ListDownlinkView<V> didDrop​(swim.observable.function.DidDrop didDrop)
        Specified by:
        didDrop in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didDrop in interface swim.observable.ObservableList<V>
      • willTake

        public ListDownlinkView<V> willTake​(swim.observable.function.WillTake willTake)
        Specified by:
        willTake in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willTake in interface swim.observable.ObservableList<V>
      • didTake

        public ListDownlinkView<V> didTake​(swim.observable.function.DidTake didTake)
        Specified by:
        didTake in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didTake in interface swim.observable.ObservableList<V>
      • willClear

        public ListDownlinkView<V> willClear​(swim.observable.function.WillClear willClear)
        Specified by:
        willClear in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willClear in interface swim.observable.ObservableList<V>
      • didClear

        public ListDownlinkView<V> didClear​(swim.observable.function.DidClear didClear)
        Specified by:
        didClear in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didClear in interface swim.observable.ObservableList<V>
      • willReceive

        public ListDownlinkView<V> willReceive​(swim.api.warp.function.WillReceive willReceive)
        Specified by:
        willReceive in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willReceive in interface swim.api.warp.WarpDownlink
        Specified by:
        willReceive in class WarpDownlinkView
      • didReceive

        public ListDownlinkView<V> didReceive​(swim.api.warp.function.DidReceive didReceive)
        Specified by:
        didReceive in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didReceive in interface swim.api.warp.WarpDownlink
        Specified by:
        didReceive in class WarpDownlinkView
      • willCommand

        public ListDownlinkView<V> willCommand​(swim.api.warp.function.WillCommand willCommand)
        Specified by:
        willCommand in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willCommand in interface swim.api.warp.WarpDownlink
        Specified by:
        willCommand in class WarpDownlinkView
      • willLink

        public ListDownlinkView<V> willLink​(swim.api.warp.function.WillLink willLink)
        Specified by:
        willLink in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willLink in interface swim.api.warp.WarpDownlink
        Specified by:
        willLink in class WarpDownlinkView
      • didLink

        public ListDownlinkView<V> didLink​(swim.api.warp.function.DidLink didLink)
        Specified by:
        didLink in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didLink in interface swim.api.warp.WarpDownlink
        Specified by:
        didLink in class WarpDownlinkView
      • willSync

        public ListDownlinkView<V> willSync​(swim.api.warp.function.WillSync willSync)
        Specified by:
        willSync in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willSync in interface swim.api.warp.WarpDownlink
        Specified by:
        willSync in class WarpDownlinkView
      • didSync

        public ListDownlinkView<V> didSync​(swim.api.warp.function.DidSync didSync)
        Specified by:
        didSync in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didSync in interface swim.api.warp.WarpDownlink
        Specified by:
        didSync in class WarpDownlinkView
      • willUnlink

        public ListDownlinkView<V> willUnlink​(swim.api.warp.function.WillUnlink willUnlink)
        Specified by:
        willUnlink in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        willUnlink in interface swim.api.warp.WarpDownlink
        Specified by:
        willUnlink in class WarpDownlinkView
      • didUnlink

        public ListDownlinkView<V> didUnlink​(swim.api.warp.function.DidUnlink didUnlink)
        Specified by:
        didUnlink in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didUnlink in interface swim.api.warp.WarpDownlink
        Specified by:
        didUnlink in class WarpDownlinkView
      • didConnect

        public ListDownlinkView<V> didConnect​(swim.api.function.DidConnect didConnect)
        Specified by:
        didConnect in interface swim.api.Downlink
        Specified by:
        didConnect in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didConnect in interface swim.api.warp.WarpDownlink
        Specified by:
        didConnect in class WarpDownlinkView
      • didDisconnect

        public ListDownlinkView<V> didDisconnect​(swim.api.function.DidDisconnect didDisconnect)
        Specified by:
        didDisconnect in interface swim.api.Downlink
        Specified by:
        didDisconnect in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didDisconnect in interface swim.api.warp.WarpDownlink
        Specified by:
        didDisconnect in class WarpDownlinkView
      • didClose

        public ListDownlinkView<V> didClose​(swim.api.function.DidClose didClose)
        Specified by:
        didClose in interface swim.api.Downlink
        Specified by:
        didClose in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didClose in interface swim.api.warp.WarpDownlink
        Specified by:
        didClose in class WarpDownlinkView
      • didFail

        public ListDownlinkView<V> didFail​(swim.api.function.DidFail didFail)
        Specified by:
        didFail in interface swim.api.Downlink
        Specified by:
        didFail in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        didFail in interface swim.api.warp.WarpDownlink
        Specified by:
        didFail in class WarpDownlinkView
      • dispatchWillUpdate

        public Map.Entry<Boolean,​V> dispatchWillUpdate​(int index,
                                                             V newValue,
                                                             boolean preemptive)
      • dispatchDidUpdate

        public boolean dispatchDidUpdate​(int index,
                                         V newValue,
                                         V oldValue,
                                         boolean preemptive)
      • dispatchWillMove

        public boolean dispatchWillMove​(int fromIndex,
                                        int toIndex,
                                        V value,
                                        boolean preemptive)
      • dispatchDidMove

        public boolean dispatchDidMove​(int fromIndex,
                                       int toIndex,
                                       V value,
                                       boolean preemptive)
      • dispatchWillRemove

        public boolean dispatchWillRemove​(int index,
                                          boolean preemptive)
      • dispatchDidRemove

        public boolean dispatchDidRemove​(int index,
                                         V oldValue,
                                         boolean preemptive)
      • dispatchWillDrop

        public boolean dispatchWillDrop​(int lower,
                                        boolean preemptive)
      • dispatchDidDrop

        public boolean dispatchDidDrop​(int lower,
                                       boolean preemptive)
      • dispatchWillTake

        public boolean dispatchWillTake​(int upper,
                                        boolean preemptive)
      • dispatchDidTake

        public boolean dispatchDidTake​(int upper,
                                       boolean preemptive)
      • dispatchWillClear

        public boolean dispatchWillClear​(boolean preemptive)
      • dispatchDidClear

        public boolean dispatchDidClear​(boolean preemptive)
      • downlinkWillInsertValue

        public swim.structure.Value downlinkWillInsertValue​(int index,
                                                            swim.structure.Value newValue)
      • downlinkDidInsertValue

        public void downlinkDidInsertValue​(int index,
                                           swim.structure.Value newValue)
      • downlinkWillInsert

        public V downlinkWillInsert​(int index,
                                    V newValue)
      • downlinkDidInsert

        public void downlinkDidInsert​(int index,
                                      V newValue)
      • downlinkWillUpdateValue

        public swim.structure.Value downlinkWillUpdateValue​(int index,
                                                            swim.structure.Value newValue)
      • downlinkDidUpdateValue

        public void downlinkDidUpdateValue​(int index,
                                           swim.structure.Value newValue,
                                           swim.structure.Value oldValue)
      • downlinkWillUpdate

        public V downlinkWillUpdate​(int index,
                                    V newValue)
      • downlinkDidUpdate

        public void downlinkDidUpdate​(int index,
                                      V newValue,
                                      V oldValue)
      • downlinkWillMoveValue

        public void downlinkWillMoveValue​(int fromIndex,
                                          int toIndex,
                                          swim.structure.Value value)
      • downlinkDidMoveValue

        public void downlinkDidMoveValue​(int fromIndex,
                                         int toIndex,
                                         swim.structure.Value value)
      • downlinkWillMove

        public void downlinkWillMove​(int fromIndex,
                                     int toIndex,
                                     V value)
      • downlinkDidMove

        public void downlinkDidMove​(int fromIndex,
                                    int toIndex,
                                    V value)
      • downlinkWillRemoveValue

        public void downlinkWillRemoveValue​(int index)
      • downlinkDidRemoveValue

        public void downlinkDidRemoveValue​(int index,
                                           swim.structure.Value oldValue)
      • downlinkWillRemove

        public void downlinkWillRemove​(int index)
      • downlinkDidRemove

        public void downlinkDidRemove​(int index,
                                      V oldValue)
      • downlinkWillDrop

        public void downlinkWillDrop​(int lower)
      • downlinkDidDrop

        public void downlinkDidDrop​(int lower)
      • downlinkWillTake

        public void downlinkWillTake​(int upper)
      • downlinkDidTake

        public void downlinkDidTake​(int upper)
      • downlinkWillClear

        public void downlinkWillClear()
      • downlinkDidClear

        public void downlinkDidClear()
      • open

        public ListDownlinkView<V> open()
        Specified by:
        open in interface swim.api.Downlink
        Specified by:
        open in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        open in interface swim.api.warp.WarpDownlink
        Specified by:
        open in class WarpDownlinkView
      • close

        public void close()
        Specified by:
        close in interface swim.api.Link
        Overrides:
        close in class DownlinkView
      • get

        public V get​(int index)
        Specified by:
        get in interface List<V>
      • set

        public V set​(int index,
                     V element)
        Specified by:
        set in interface List<V>
      • add

        public void add​(int index,
                        V element)
        Specified by:
        add in interface List<V>
      • remove

        public V remove​(int index)
        Specified by:
        remove in interface List<V>
      • subList

        public List<V> subList​(int fromIndex,
                               int toIndex)
        Specified by:
        subList in interface List<V>
      • drop

        public void drop​(int lower)
        Specified by:
        drop in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        drop in interface swim.observable.ObservableList<V>
      • take

        public void take​(int upper)
        Specified by:
        take in interface swim.api.downlink.ListDownlink<V>
        Specified by:
        take in interface swim.observable.ObservableList<V>
      • add

        public boolean add​(V v)
        Specified by:
        add in interface Collection<V>
        Specified by:
        add in interface List<V>
      • addAll

        public boolean addAll​(int index,
                              Collection<? extends V> elements)
        Specified by:
        addAll in interface List<V>
      • get

        public V get​(int index,
                     Object key)
        Specified by:
        get in interface swim.util.KeyedList<V>
      • getEntry

        public Map.Entry<Object,​V> getEntry​(int index)
        Specified by:
        getEntry in interface swim.util.KeyedList<V>
      • getEntry

        public Map.Entry<Object,​V> getEntry​(int index,
                                                  Object key)
        Specified by:
        getEntry in interface swim.util.KeyedList<V>
      • set

        public V set​(int index,
                     V element,
                     Object key)
        Specified by:
        set in interface swim.util.KeyedList<V>
      • add

        public boolean add​(V element,
                           Object key)
        Specified by:
        add in interface swim.util.KeyedList<V>
      • add

        public void add​(int index,
                        V element,
                        Object key)
        Specified by:
        add in interface swim.util.KeyedList<V>
      • remove

        public V remove​(int index,
                        Object key)
        Specified by:
        remove in interface swim.util.KeyedList<V>
      • move

        public void move​(int fromIndex,
                         int toIndex)
        Specified by:
        move in interface swim.util.KeyedList<V>
        Specified by:
        move in interface swim.observable.ObservableList<V>
      • move

        public void move​(int fromIndex,
                         int toIndex,
                         Object key)
        Specified by:
        move in interface swim.util.KeyedList<V>
      • keyIterator

        public ListIterator<Object> keyIterator()
        Specified by:
        keyIterator in interface swim.util.KeyedList<V>