Module swim.runtime

Class ValueDownlinkView<V>

  • All Implemented Interfaces:
    swim.api.downlink.Downlink, swim.api.downlink.ValueDownlink<V>, swim.api.Link, swim.observable.Observable<Object>, swim.observable.ObservableValue<V>, swim.streamlet.Inlet<V>, swim.streamlet.Outlet<V>, swim.util.Log
    Direct Known Subclasses:
    JoinValueLaneDownlink

    public class ValueDownlinkView<V>
    extends DownlinkView
    implements swim.api.downlink.ValueDownlink<V>
    • Field Detail

      • valueForm

        protected final swim.structure.Form<V> valueForm
      • input

        protected swim.streamlet.Outlet<? extends V> input
      • outputs

        protected swim.streamlet.Inlet<? super V>[] outputs
      • version

        protected int version
    • Constructor Detail

      • ValueDownlinkView

        public ValueDownlinkView​(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)
      • ValueDownlinkView

        public ValueDownlinkView​(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 ValueDownlinkView<V> hostUri​(swim.uri.Uri hostUri)
        Specified by:
        hostUri in interface swim.api.downlink.Downlink
        Specified by:
        hostUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        hostUri in class DownlinkView
      • hostUri

        public ValueDownlinkView<V> hostUri​(String hostUri)
        Specified by:
        hostUri in interface swim.api.downlink.Downlink
        Specified by:
        hostUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        hostUri in class DownlinkView
      • nodeUri

        public ValueDownlinkView<V> nodeUri​(swim.uri.Uri nodeUri)
        Specified by:
        nodeUri in interface swim.api.downlink.Downlink
        Specified by:
        nodeUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        nodeUri in class DownlinkView
      • nodeUri

        public ValueDownlinkView<V> nodeUri​(String nodeUri)
        Specified by:
        nodeUri in interface swim.api.downlink.Downlink
        Specified by:
        nodeUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        nodeUri in class DownlinkView
      • laneUri

        public ValueDownlinkView<V> laneUri​(swim.uri.Uri laneUri)
        Specified by:
        laneUri in interface swim.api.downlink.Downlink
        Specified by:
        laneUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        laneUri in class DownlinkView
      • laneUri

        public ValueDownlinkView<V> laneUri​(String laneUri)
        Specified by:
        laneUri in interface swim.api.downlink.Downlink
        Specified by:
        laneUri in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        laneUri in class DownlinkView
      • prio

        public ValueDownlinkView<V> prio​(float prio)
        Specified by:
        prio in interface swim.api.downlink.Downlink
        Specified by:
        prio in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        prio in class DownlinkView
      • rate

        public ValueDownlinkView<V> rate​(float rate)
        Specified by:
        rate in interface swim.api.downlink.Downlink
        Specified by:
        rate in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        rate in class DownlinkView
      • body

        public ValueDownlinkView<V> body​(swim.structure.Value body)
        Specified by:
        body in interface swim.api.downlink.Downlink
        Specified by:
        body in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        body in class DownlinkView
      • keepLinked

        public ValueDownlinkView<V> keepLinked​(boolean keepLinked)
        Specified by:
        keepLinked in interface swim.api.downlink.Downlink
        Specified by:
        keepLinked in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        keepLinked in class DownlinkView
      • keepSynced

        public ValueDownlinkView<V> keepSynced​(boolean keepSynced)
        Specified by:
        keepSynced in interface swim.api.downlink.Downlink
        Specified by:
        keepSynced in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        keepSynced in class DownlinkView
      • isStateful

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

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

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

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

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

        protected Object typesafeObservers​(Object observers)
      • observe

        public ValueDownlinkView<V> observe​(Object observer)
        Specified by:
        observe in interface swim.api.downlink.Downlink
        Specified by:
        observe in interface swim.api.Link
        Specified by:
        observe in interface swim.observable.Observable<V>
        Specified by:
        observe in interface swim.observable.ObservableValue<V>
        Specified by:
        observe in interface swim.api.downlink.ValueDownlink<V>
        Overrides:
        observe in class DownlinkView
      • unobserve

        public ValueDownlinkView<V> unobserve​(Object observer)
        Specified by:
        unobserve in interface swim.api.downlink.Downlink
        Specified by:
        unobserve in interface swim.api.Link
        Specified by:
        unobserve in interface swim.observable.Observable<V>
        Specified by:
        unobserve in interface swim.observable.ObservableValue<V>
        Specified by:
        unobserve in interface swim.api.downlink.ValueDownlink<V>
        Overrides:
        unobserve in class DownlinkView
      • willSet

        public ValueDownlinkView<V> willSet​(swim.observable.function.WillSet<V> willSet)
        Specified by:
        willSet in interface swim.observable.ObservableValue<V>
        Specified by:
        willSet in interface swim.api.downlink.ValueDownlink<V>
      • didSet

        public ValueDownlinkView<V> didSet​(swim.observable.function.DidSet<V> didSet)
        Specified by:
        didSet in interface swim.observable.ObservableValue<V>
        Specified by:
        didSet in interface swim.api.downlink.ValueDownlink<V>
      • willReceive

        public ValueDownlinkView<V> willReceive​(swim.api.downlink.function.WillReceive willReceive)
        Specified by:
        willReceive in interface swim.api.downlink.Downlink
        Specified by:
        willReceive in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        willReceive in class DownlinkView
      • didReceive

        public ValueDownlinkView<V> didReceive​(swim.api.downlink.function.DidReceive didReceive)
        Specified by:
        didReceive in interface swim.api.downlink.Downlink
        Specified by:
        didReceive in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didReceive in class DownlinkView
      • willCommand

        public ValueDownlinkView<V> willCommand​(swim.api.downlink.function.WillCommand willCommand)
        Specified by:
        willCommand in interface swim.api.downlink.Downlink
        Specified by:
        willCommand in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        willCommand in class DownlinkView
      • willLink

        public ValueDownlinkView<V> willLink​(swim.api.downlink.function.WillLink willLink)
        Specified by:
        willLink in interface swim.api.downlink.Downlink
        Specified by:
        willLink in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        willLink in class DownlinkView
      • didLink

        public ValueDownlinkView<V> didLink​(swim.api.downlink.function.DidLink didLink)
        Specified by:
        didLink in interface swim.api.downlink.Downlink
        Specified by:
        didLink in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didLink in class DownlinkView
      • willSync

        public ValueDownlinkView<V> willSync​(swim.api.downlink.function.WillSync willSync)
        Specified by:
        willSync in interface swim.api.downlink.Downlink
        Specified by:
        willSync in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        willSync in class DownlinkView
      • didSync

        public ValueDownlinkView<V> didSync​(swim.api.downlink.function.DidSync didSync)
        Specified by:
        didSync in interface swim.api.downlink.Downlink
        Specified by:
        didSync in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didSync in class DownlinkView
      • willUnlink

        public ValueDownlinkView<V> willUnlink​(swim.api.downlink.function.WillUnlink willUnlink)
        Specified by:
        willUnlink in interface swim.api.downlink.Downlink
        Specified by:
        willUnlink in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        willUnlink in class DownlinkView
      • didUnlink

        public ValueDownlinkView<V> didUnlink​(swim.api.downlink.function.DidUnlink didUnlink)
        Specified by:
        didUnlink in interface swim.api.downlink.Downlink
        Specified by:
        didUnlink in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didUnlink in class DownlinkView
      • didConnect

        public ValueDownlinkView<V> didConnect​(swim.api.function.DidConnect didConnect)
        Specified by:
        didConnect in interface swim.api.downlink.Downlink
        Specified by:
        didConnect in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didConnect in class DownlinkView
      • didDisconnect

        public ValueDownlinkView<V> didDisconnect​(swim.api.function.DidDisconnect didDisconnect)
        Specified by:
        didDisconnect in interface swim.api.downlink.Downlink
        Specified by:
        didDisconnect in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didDisconnect in class DownlinkView
      • didClose

        public ValueDownlinkView<V> didClose​(swim.api.function.DidClose didClose)
        Specified by:
        didClose in interface swim.api.downlink.Downlink
        Specified by:
        didClose in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didClose in class DownlinkView
      • didFail

        public ValueDownlinkView<V> didFail​(swim.api.function.DidFail didFail)
        Specified by:
        didFail in interface swim.api.downlink.Downlink
        Specified by:
        didFail in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        didFail in class DownlinkView
      • dispatchWillSet

        protected Map.Entry<Boolean,​V> dispatchWillSet​(V newValue,
                                                             boolean preemptive)
      • dispatchDidSet

        protected boolean dispatchDidSet​(V newValue,
                                         V oldValue,
                                         boolean preemptive)
      • downlinkWillSetValue

        public swim.structure.Value downlinkWillSetValue​(swim.structure.Value newValue)
      • downlinkDidSetValue

        public void downlinkDidSetValue​(swim.structure.Value newValue,
                                        swim.structure.Value oldValue)
      • downlinkWillSet

        public V downlinkWillSet​(V newValue)
      • downlinkDidSet

        public void downlinkDidSet​(V newValue,
                                   V oldValue)
      • open

        public ValueDownlinkView<V> open()
        Specified by:
        open in interface swim.api.downlink.Downlink
        Specified by:
        open in interface swim.api.downlink.ValueDownlink<V>
        Specified by:
        open in class DownlinkView
      • get

        public V get()
        Specified by:
        get in interface swim.observable.ObservableValue<V>
        Specified by:
        get in interface swim.streamlet.Outlet<V>
        Specified by:
        get in interface swim.api.downlink.ValueDownlink<V>
      • set

        public V set​(V newValue)
        Specified by:
        set in interface swim.observable.ObservableValue<V>
        Specified by:
        set in interface swim.api.downlink.ValueDownlink<V>
      • input

        public swim.streamlet.Outlet<? extends V> input()
        Specified by:
        input in interface swim.streamlet.Inlet<V>
      • bindInput

        public void bindInput​(swim.streamlet.Outlet<? extends V> input)
        Specified by:
        bindInput in interface swim.streamlet.Inlet<V>
      • unbindInput

        public void unbindInput()
        Specified by:
        unbindInput in interface swim.streamlet.Inlet<V>
      • disconnectInputs

        public void disconnectInputs()
        Specified by:
        disconnectInputs in interface swim.streamlet.Inlet<V>
        Specified by:
        disconnectInputs in interface swim.streamlet.Outlet<V>
      • outputIterator

        public Iterator<swim.streamlet.Inlet<? super V>> outputIterator()
        Specified by:
        outputIterator in interface swim.streamlet.Outlet<V>
      • bindOutput

        public void bindOutput​(swim.streamlet.Inlet<? super V> output)
        Specified by:
        bindOutput in interface swim.streamlet.Outlet<V>
      • unbindOutput

        public void unbindOutput​(swim.streamlet.Inlet<? super V> output)
        Specified by:
        unbindOutput in interface swim.streamlet.Outlet<V>
      • unbindOutputs

        public void unbindOutputs()
        Specified by:
        unbindOutputs in interface swim.streamlet.Outlet<V>
      • disconnectOutputs

        public void disconnectOutputs()
        Specified by:
        disconnectOutputs in interface swim.streamlet.Inlet<V>
        Specified by:
        disconnectOutputs in interface swim.streamlet.Outlet<V>
      • invalidateOutput

        public void invalidateOutput()
        Specified by:
        invalidateOutput in interface swim.streamlet.Inlet<V>
      • invalidateInput

        public void invalidateInput()
        Specified by:
        invalidateInput in interface swim.streamlet.Outlet<V>
      • invalidate

        public void invalidate()
      • reconcileOutput

        public void reconcileOutput​(int version)
        Specified by:
        reconcileOutput in interface swim.streamlet.Inlet<V>
      • reconcileInput

        public void reconcileInput​(int version)
        Specified by:
        reconcileInput in interface swim.streamlet.Outlet<V>
      • reconcile

        public void reconcile​(int version)
      • willInvalidate

        protected void willInvalidate()
      • onInvalidate

        protected void onInvalidate()
      • didInvalidate

        protected void didInvalidate()
      • willReconcile

        protected void willReconcile​(int version)
      • onReconcile

        protected void onReconcile​(int version)
      • didReconcile

        protected void didReconcile​(int version)