java.lang.Object
swim.system.DownlinkView
swim.system.warp.WarpDownlinkView
swim.system.downlink.ValueDownlinkView<V>
- All Implemented Interfaces:
Downlink
,ValueDownlink<V>
,Link
,WarpDownlink
,WarpLink
,Observable<Object>
,ObservableValue<V>
,Inlet<V>
,Outlet<V>
,Log
- Direct Known Subclasses:
JoinValueLaneDownlink
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ValueDownlinkModel
protected static final int
protected int
Fields inherited from class swim.system.warp.WarpDownlinkView
body, flags, hostUri, KEEP_LINKED, KEEP_SYNCED, laneUri, meshUri, nodeUri, prio, rate
Fields inherited from class swim.system.DownlinkView
cellContext, observers, stage
-
Constructor Summary
ConstructorsConstructorDescriptionValueDownlinkView
(CellContext cellContext, Stage stage, Uri meshUri, Uri hostUri, Uri nodeUri, Uri laneUri, float prio, float rate, Value body, int flags, Form<V> valueForm, Object observers) ValueDownlinkView
(CellContext cellContext, Stage stage, Uri meshUri, Uri hostUri, Uri nodeUri, Uri laneUri, float prio, float rate, Value body, Form<V> valueForm) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Connects thisInlet
to anOutlet
from which it will acquire its state.void
bindOutput
(Inlet<? super V> output) Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
.void
close()
void
decohere()
void
Marks thisOutlet
—and alloutputs
that depend on the state of thisOutlet
—as having decoherent state.void
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having decoherent state.didConnect
(DidConnect didConnect) protected void
didDisconnect
(DidDisconnect didDisconnect) didReceive
(DidReceive didReceive) protected void
didRecohere
(int version) void
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph.void
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph.boolean
dispatchDidSet
(V newValue, V oldValue, boolean preemptive) dispatchWillSet
(V newValue, boolean preemptive) void
downlinkDidSet
(V newValue, V oldValue) void
downlinkDidSetValue
(Value newValue, Value oldValue) downlinkWillSet
(V newValue) downlinkWillSetValue
(Value newValue) get()
Returns the current state of thisOutlet
.input()
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.final boolean
isStateful
(boolean isStateful) keepLinked
(boolean keepLinked) keepSynced
(boolean keepSynced) protected void
protected void
onRecohere
(int version) open()
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.prio
(float prio) rate
(float rate) void
recohere
(int version) void
recohereInput
(int version) Updates the state of thisOutlet
to make it consistent with the targetversion
.void
recohereOutput
(int version) Updates the state of thisInlet
to make it consistent with thetarget
version.protected Object
typesafeObservers
(Object observers) void
Disconnects thisInlet
from its inputOutlet
, if connected.void
unbindOutput
(Inlet<? super V> output) Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.void
Disconnects all outputs from thisOutlet
by invokingInlet.unbindInput()
on eachInelt
that depends on the state of thisOutlet
.<V2> ValueDownlinkView<V2>
valueClass
(Class<V2> valueClass) <V2> ValueDownlinkView<V2>
willCommand
(WillCommand willCommand) protected void
willReceive
(WillReceive willReceive) protected void
willRecohere
(int version) willUnlink
(WillUnlink willUnlink) Methods inherited from class swim.system.warp.WarpDownlinkView
body, command, command, command, command, dispatchDidLink, dispatchDidReceive, dispatchDidSync, dispatchDidUnlink, dispatchWillCommand, dispatchWillLink, dispatchWillReceive, dispatchWillSync, dispatchWillUnlink, downlinkDidLink, downlinkDidReceive, downlinkDidSync, downlinkDidUnlink, downlinkWillCommand, downlinkWillLink, downlinkWillReceive, downlinkWillSync, downlinkWillUnlink, hostUri, keepLinked, keepSynced, laneUri, meshUri, nodeUri, prio, rate
Methods inherited from class swim.system.DownlinkView
cellContext, cipherSuite, debug, dispatchDidClose, dispatchDidConnect, dispatchDidDisconnect, dispatchDidFail, downlinkDidClose, downlinkDidConnect, downlinkDidDisconnect, downlinkDidFail, error, fail, info, isConnected, isRemote, isSecure, localAddress, localCertificates, localIdentity, localPrincipal, remoteAddress, remoteCertificates, remoteIdentity, remotePrincipal, securityProtocol, stage, trace, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface swim.api.Link
cipherSuite, hostUri, isConnected, isRemote, isSecure, laneUri, localAddress, localCertificates, localIdentity, localPrincipal, nodeUri, remoteAddress, remoteCertificates, remoteIdentity, remotePrincipal, securityProtocol
Methods inherited from interface swim.api.warp.WarpDownlink
body, command, command, command, command, keepLinked, keepSynced, prio, rate
-
Field Details
-
valueForm
-
model
-
input
-
outputs
-
version
protected int version -
STATEFUL
protected static final int STATEFUL- See Also:
-
-
Constructor Details
-
ValueDownlinkView
-
ValueDownlinkView
-
-
Method Details
-
downlinkModel
- Specified by:
downlinkModel
in classWarpDownlinkView
-
hostUri
- Specified by:
hostUri
in interfaceValueDownlink<V>
- Specified by:
hostUri
in interfaceWarpDownlink
- Specified by:
hostUri
in classWarpDownlinkView
-
hostUri
- Specified by:
hostUri
in interfaceValueDownlink<V>
- Specified by:
hostUri
in interfaceWarpDownlink
- Specified by:
hostUri
in classWarpDownlinkView
-
nodeUri
- Specified by:
nodeUri
in interfaceValueDownlink<V>
- Specified by:
nodeUri
in interfaceWarpDownlink
- Specified by:
nodeUri
in classWarpDownlinkView
-
nodeUri
- Specified by:
nodeUri
in interfaceValueDownlink<V>
- Specified by:
nodeUri
in interfaceWarpDownlink
- Specified by:
nodeUri
in classWarpDownlinkView
-
laneUri
- Specified by:
laneUri
in interfaceValueDownlink<V>
- Specified by:
laneUri
in interfaceWarpDownlink
- Specified by:
laneUri
in classWarpDownlinkView
-
laneUri
- Specified by:
laneUri
in interfaceValueDownlink<V>
- Specified by:
laneUri
in interfaceWarpDownlink
- Specified by:
laneUri
in classWarpDownlinkView
-
prio
- Specified by:
prio
in interfaceValueDownlink<V>
- Specified by:
prio
in interfaceWarpDownlink
- Specified by:
prio
in classWarpDownlinkView
-
rate
- Specified by:
rate
in interfaceValueDownlink<V>
- Specified by:
rate
in interfaceWarpDownlink
- Specified by:
rate
in classWarpDownlinkView
-
body
- Specified by:
body
in interfaceValueDownlink<V>
- Specified by:
body
in interfaceWarpDownlink
- Specified by:
body
in classWarpDownlinkView
-
keepLinked
- Specified by:
keepLinked
in interfaceValueDownlink<V>
- Specified by:
keepLinked
in interfaceWarpDownlink
- Specified by:
keepLinked
in classWarpDownlinkView
-
keepSynced
- Specified by:
keepSynced
in interfaceValueDownlink<V>
- Specified by:
keepSynced
in interfaceWarpDownlink
- Specified by:
keepSynced
in classWarpDownlinkView
-
isStateful
public final boolean isStateful()- Specified by:
isStateful
in interfaceValueDownlink<V>
-
isStateful
- Specified by:
isStateful
in interfaceValueDownlink<V>
-
valueForm
- Specified by:
valueForm
in interfaceValueDownlink<V>
-
valueForm
- Specified by:
valueForm
in interfaceValueDownlink<V>
-
valueClass
- Specified by:
valueClass
in interfaceValueDownlink<V>
-
typesafeObservers
-
observe
- Specified by:
observe
in interfaceDownlink
- Specified by:
observe
in interfaceLink
- Specified by:
observe
in interfaceObservable<V>
- Specified by:
observe
in interfaceObservableValue<V>
- Specified by:
observe
in interfaceValueDownlink<V>
- Specified by:
observe
in interfaceWarpDownlink
- Overrides:
observe
in classWarpDownlinkView
-
unobserve
- Specified by:
unobserve
in interfaceDownlink
- Specified by:
unobserve
in interfaceLink
- Specified by:
unobserve
in interfaceObservable<V>
- Specified by:
unobserve
in interfaceObservableValue<V>
- Specified by:
unobserve
in interfaceValueDownlink<V>
- Specified by:
unobserve
in interfaceWarpDownlink
- Overrides:
unobserve
in classWarpDownlinkView
-
willSet
- Specified by:
willSet
in interfaceObservableValue<V>
- Specified by:
willSet
in interfaceValueDownlink<V>
-
didSet
- Specified by:
didSet
in interfaceObservableValue<V>
- Specified by:
didSet
in interfaceValueDownlink<V>
-
willReceive
- Specified by:
willReceive
in interfaceValueDownlink<V>
- Specified by:
willReceive
in interfaceWarpDownlink
- Specified by:
willReceive
in classWarpDownlinkView
-
didReceive
- Specified by:
didReceive
in interfaceValueDownlink<V>
- Specified by:
didReceive
in interfaceWarpDownlink
- Specified by:
didReceive
in classWarpDownlinkView
-
willCommand
- Specified by:
willCommand
in interfaceValueDownlink<V>
- Specified by:
willCommand
in interfaceWarpDownlink
- Specified by:
willCommand
in classWarpDownlinkView
-
willLink
- Specified by:
willLink
in interfaceValueDownlink<V>
- Specified by:
willLink
in interfaceWarpDownlink
- Specified by:
willLink
in classWarpDownlinkView
-
didLink
- Specified by:
didLink
in interfaceValueDownlink<V>
- Specified by:
didLink
in interfaceWarpDownlink
- Specified by:
didLink
in classWarpDownlinkView
-
willSync
- Specified by:
willSync
in interfaceValueDownlink<V>
- Specified by:
willSync
in interfaceWarpDownlink
- Specified by:
willSync
in classWarpDownlinkView
-
didSync
- Specified by:
didSync
in interfaceValueDownlink<V>
- Specified by:
didSync
in interfaceWarpDownlink
- Specified by:
didSync
in classWarpDownlinkView
-
willUnlink
- Specified by:
willUnlink
in interfaceValueDownlink<V>
- Specified by:
willUnlink
in interfaceWarpDownlink
- Specified by:
willUnlink
in classWarpDownlinkView
-
didUnlink
- Specified by:
didUnlink
in interfaceValueDownlink<V>
- Specified by:
didUnlink
in interfaceWarpDownlink
- Specified by:
didUnlink
in classWarpDownlinkView
-
didConnect
- Specified by:
didConnect
in interfaceDownlink
- Specified by:
didConnect
in interfaceValueDownlink<V>
- Specified by:
didConnect
in interfaceWarpDownlink
- Specified by:
didConnect
in classWarpDownlinkView
-
didDisconnect
- Specified by:
didDisconnect
in interfaceDownlink
- Specified by:
didDisconnect
in interfaceValueDownlink<V>
- Specified by:
didDisconnect
in interfaceWarpDownlink
- Specified by:
didDisconnect
in classWarpDownlinkView
-
didClose
- Specified by:
didClose
in interfaceDownlink
- Specified by:
didClose
in interfaceValueDownlink<V>
- Specified by:
didClose
in interfaceWarpDownlink
- Specified by:
didClose
in classWarpDownlinkView
-
didFail
- Specified by:
didFail
in interfaceDownlink
- Specified by:
didFail
in interfaceValueDownlink<V>
- Specified by:
didFail
in interfaceWarpDownlink
- Specified by:
didFail
in classWarpDownlinkView
-
dispatchWillSet
-
dispatchDidSet
-
downlinkWillSetValue
-
downlinkDidSetValue
-
downlinkWillSet
-
downlinkDidSet
-
createDownlinkModel
- Specified by:
createDownlinkModel
in classWarpDownlinkView
-
open
- Specified by:
open
in interfaceDownlink
- Specified by:
open
in interfaceValueDownlink<V>
- Specified by:
open
in interfaceWarpDownlink
- Specified by:
open
in classWarpDownlinkView
-
close
public void close()- Specified by:
close
in interfaceLink
- Overrides:
close
in classDownlinkView
-
get
Description copied from interface:Outlet
Returns the current state of thisOutlet
.- Specified by:
get
in interfaceObservableValue<V>
- Specified by:
get
in interfaceOutlet<V>
- Specified by:
get
in interfaceValueDownlink<V>
-
set
- Specified by:
set
in interfaceObservableValue<V>
- Specified by:
set
in interfaceValueDownlink<V>
-
input
Description copied from interface:Inlet
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected. -
bindInput
Description copied from interface:Inlet
Connects thisInlet
to anOutlet
from which it will acquire its state. If thisInlet
is already connected, it will first disconnect from its existing input. Then, after updating itsinput
property, theInlet
will invokeOutlet.bindOutput(Inlet)
on its newinput
. -
unbindInput
public void unbindInput()Description copied from interface:Inlet
Disconnects thisInlet
from its inputOutlet
, if connected. After setting itsinput
property tonull
, theInlet
will invokeOutlet.unbindOutput(Inlet)
on its old input, if defined.- Specified by:
unbindInput
in interfaceInlet<V>
-
disconnectInputs
public void disconnectInputs()Description copied from interface:Inlet
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet
.- Specified by:
disconnectInputs
in interfaceInlet<V>
- Specified by:
disconnectInputs
in interfaceOutlet<V>
-
outputIterator
Description copied from interface:Outlet
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.- Specified by:
outputIterator
in interfaceOutlet<V>
-
bindOutput
Description copied from interface:Outlet
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
. Theoutput
will be decohered when the state of thisOutlet
is decohered, and recohered when thisOutlet
is recohered.- Specified by:
bindOutput
in interfaceOutlet<V>
-
unbindOutput
Description copied from interface:Outlet
Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.- Specified by:
unbindOutput
in interfaceOutlet<V>
-
unbindOutputs
public void unbindOutputs()Description copied from interface:Outlet
Disconnects all outputs from thisOutlet
by invokingInlet.unbindInput()
on eachInelt
that depends on the state of thisOutlet
.- Specified by:
unbindOutputs
in interfaceOutlet<V>
-
disconnectOutputs
public void disconnectOutputs()Description copied from interface:Inlet
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet
.- Specified by:
disconnectOutputs
in interfaceInlet<V>
- Specified by:
disconnectOutputs
in interfaceOutlet<V>
-
decohereOutput
public void decohereOutput()Description copied from interface:Inlet
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having decoherent state. Decohering anInlet
will recursively decohere all streamlets that transitively depend on the state of thisInlet
. Decohering anInlet
does not cause its state to be recomputed. A subsequentInlet.recohereOutput(int)
call will eventually make the state of theInlet
coherent again.- Specified by:
decohereOutput
in interfaceInlet<V>
-
decohereInput
public void decohereInput()Description copied from interface:Outlet
Marks thisOutlet
—and alloutputs
that depend on the state of thisOutlet
—as having decoherent state.- Specified by:
decohereInput
in interfaceOutlet<V>
-
decohere
public void decohere() -
recohereOutput
public void recohereOutput(int version) Description copied from interface:Inlet
Updates the state of thisInlet
to make it consistent with thetarget
version. TheInlet
only needs to update if its currentversion
differs from the targetversion
. To update its state, theInlet
first invokesOutlet.recohereInput(int)
on itsinput
, to ensure that its input is coherent. It then invokesStreamlet.recohere(int)
on theStreamlet
to which it's attached, causing theStreamlet
to make its own state coherent again.- Specified by:
recohereOutput
in interfaceInlet<V>
-
recohereInput
public void recohereInput(int version) Description copied from interface:Outlet
Updates the state of thisOutlet
to make it consistent with the targetversion
. TheOutlet
only needs to update if its currentversion
differs from the targetversion
. To update its state, theOutlet
first invokesStreamlet.recohere(int)
on theStreamlet
to which it's attached. It then invokesInlet.recohereOutput(int)
on each of its dependentoutputs
.- Specified by:
recohereInput
in interfaceOutlet<V>
-
recohere
public void recohere(int version) -
willDecohere
protected void willDecohere() -
onDecohere
protected void onDecohere() -
didDecohere
protected void didDecohere() -
willRecohere
protected void willRecohere(int version) -
onRecohere
protected void onRecohere(int version) -
didRecohere
protected void didRecohere(int version)
-