- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.LaneView
-
- swim.runtime.warp.WarpLaneView
-
- swim.runtime.lane.MapLaneView<K,V>
-
- All Implemented Interfaces:
Iterable<Map.Entry<K,V>>
,Map<K,V>
,SortedMap<K,V>
,DownlinkFactory
,Lane
,MapLane<K,V>
,SwimRef
,WarpLane
,Observable<Object>
,ObservableIterableMap<K,V>
,ObservableMap<K,V>
,ObservableOrderedMap<K,V>
,ObservableSortedMap<K,V>
,CellContext
,TierBinding
,Inlet<Map<K,V>>
,MapInlet<K,V,Map<K,V>>
,MapOutlet<K,V,MapLane<K,V>>
,Outlet<MapLane<K,V>>
,IterableMap<K,V>
,Log
,OrderedMap<K,V>
public class MapLaneView<K,V> extends WarpLaneView implements MapLane<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected AgentContext
agentContext
protected MapData<K,V>
dataView
protected HashTrieMap<K,KeyEffect>
effects
protected int
flags
protected MapOutlet<K,V,? extends Map<K,V>>
input
protected Form<K>
keyForm
protected MapLaneModel
laneBinding
protected HashTrieMap<K,KeyOutlet<K,V>>
outlets
protected Inlet<? super MapLane<K,V>>[]
outputs
protected Form<V>
valueForm
protected int
version
-
Fields inherited from class swim.runtime.AbstractTierBinding
CLOSED_PHASE, CLOSED_STATE, CLOSING_STATE, FAILED_STATE, FAILING_STATE, LOADED_PHASE, LOADED_STATE, LOADING_STATE, OPENED_PHASE, OPENED_STATE, OPENING_STATE, PHASE_MASK, PHASE_SHIFT, RECOVERING_STATE, STARTED_PHASE, STARTED_STATE, STARTING_STATE, STATE_MASK, status, STATUS, STOPPING_STATE, UNLOADING_STATE
-
-
Constructor Summary
Constructors Constructor Description MapLaneView(AgentContext agentContext, Form<K> keyForm, Form<V> valueForm)
-
Method Summary
Modifier and Type Method Description AgentContext
agentContext()
void
bindInput(MapOutlet<K,V,? extends Map<K,V>> input)
void
bindInput(Outlet<? extends Map<K,V>> input)
Connects thisInlet
to anOutlet
from which it will acquire its state.void
bindOutput(Inlet<? super MapLane<K,V>> output)
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
.void
clear()
void
close()
Comparator<? super K>
comparator()
boolean
containsKey(Object key)
Returnstrue
if the current state of thisMapOutlet
contains the givenkey
; otherwise returnsfalse
.boolean
containsValue(Object value)
MapLaneModel
createLaneBinding()
MapLaneView<K,V>
didClear(DidClear didClear)
MapLaneView<K,V>
didCommand(DidCommand didCommand)
MapLaneView<K,V>
didDrop(DidDrop didDrop)
MapLaneView<K,V>
didEnter(DidEnter didEnter)
protected void
didInvalidate()
protected void
didInvalidateKey(K key, KeyEffect effect)
MapLaneView<K,V>
didLeave(DidLeave didLeave)
protected void
didReconcile(int version)
protected void
didReconcileKey(K key, KeyEffect effect, int version)
MapLaneView<K,V>
didRemove(DidRemoveKey<K,V> didRemove)
MapLaneView<K,V>
didTake(DidTake didTake)
protected void
didUpdate(int version)
MapLaneView<K,V>
didUpdate(DidUpdateKey<K,V> didUpdate)
MapLaneView<K,V>
didUplink(DidUplink didUplink)
void
disconnectInputs()
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph.void
disconnectOutputs()
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph.boolean
dispatchDidClear(Link link, boolean preemptive)
boolean
dispatchDidDrop(Link link, int lower, boolean preemptive)
boolean
dispatchDidRemove(Link link, K key, V oldValue, boolean preemptive)
boolean
dispatchDidTake(Link link, int upper, boolean preemptive)
boolean
dispatchDidUpdate(Link link, K key, V newValue, V oldValue, boolean preemptive)
boolean
dispatchWillClear(Link link, boolean preemptive)
boolean
dispatchWillDrop(Link link, int lower, boolean preemptive)
boolean
dispatchWillRemove(Link link, K key, boolean preemptive)
boolean
dispatchWillTake(Link link, int upper, boolean preemptive)
Map.Entry<Boolean,V>
dispatchWillUpdate(Link link, K key, V newValue, boolean preemptive)
void
drop(int lower)
Set<Map.Entry<K,V>>
entrySet()
Map.Entry<K,V>
firstEntry()
K
firstKey()
V
firstValue()
MapLane<K,V>
get()
Returns the current state of thisOutlet
.V
get(Object key)
Returns the value assocaited with the givenkey
in the current state of thisMapOutlet
, if defined; otherwise returnsnull
.Map.Entry<K,V>
getEntry(Object key)
Map.Entry<K,V>
getIndex(int index)
OrderedMap<K,V>
headMap(K toKey)
int
indexOf(Object key)
MapOutlet<K,V,? extends Map<K,V>>
input()
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.void
invalidate()
void
invalidateInput()
void
invalidateInputKey(K key, KeyEffect effect)
Marks thisMapOutlet
as needing aneffect
applied to a givenkey
.void
invalidateKey(K key, KeyEffect effect)
void
invalidateOutput()
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having stale state.void
invalidateOutputKey(K key, KeyEffect effect)
Marks thisMapInlet
as needing aneffect
applied to a givenkey
.boolean
isEmpty()
boolean
isResident()
MapLaneView<K,V>
isResident(boolean isResident)
boolean
isTransient()
MapLaneView<K,V>
isTransient(boolean isTransient)
OrderedMapCursor<K,V>
iterator()
<K2> MapLaneView<K2,V>
keyClass(Class<K2> keyClass)
Form<K>
keyForm()
<K2> MapLaneView<K2,V>
keyForm(Form<K2> keyForm)
Cursor<K>
keyIterator()
Returns anIterator
over the keys in the current state of thisMapOutlet
.Set<K>
keySet()
MapLaneModel
laneBinding()
void
laneDidClear()
void
laneDidDrop(int lower)
void
laneDidRemove(K key, V oldValue)
void
laneDidTake(int upper)
void
laneDidUpdate(K key, V newValue, V oldValue)
void
laneWillClear()
void
laneWillDrop(int lower)
void
laneWillRemove(K key)
void
laneWillTake(int upper)
V
laneWillUpdate(K key, V newValue)
Map.Entry<K,V>
lastEntry()
K
lastKey()
V
lastValue()
Map.Entry<K,V>
nextEntry(K key)
K
nextKey(K key)
V
nextValue(K key)
MapLaneView<K,V>
observe(Object observer)
protected void
onInvalidate()
protected void
onInvalidateKey(K key, KeyEffect effect)
protected void
onReconcile(int version)
protected void
onReconcileKey(K key, KeyEffect effect, int version)
Outlet<V>
outlet(K key)
Returns anOutlet
that updates when the specifiedkey
updates.Iterator<Inlet<? super MapLane<K,V>>>
outputIterator()
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.Map.Entry<K,V>
previousEntry(K key)
K
previousKey(K key)
V
previousValue(K key)
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> map)
void
reconcile(int version)
void
reconcileInput(int version)
Reconciles the state of thisOutlet
, if the version of thisOutlet
's state differs from the targetversion
.void
reconcileInputKey(K key, int version)
Reconciles the state of an individualkey
in thisMapOutlet
, if the version of thisMapOutlet
's state differs from the targetversion
.void
reconcileKey(K key, int version)
void
reconcileOutput(int version)
Reconciles the state of thisInlet
, if the version of thisInlet
's state differs from the targetversion
.void
reconcileOutputKey(K key, int version)
Reconciles the state of an individualkey
in thisMapInlet
, if the version of thisMapInlet
's state differs from the targetversion
.V
remove(Object key)
void
setKeyForm(Form<K> keyForm)
void
setValueForm(Form<V> valueForm)
int
size()
OrderedMap<K,V>
snapshot()
OrderedMap<K,V>
subMap(K fromKey, K toKey)
OrderedMap<K,V>
tailMap(K fromKey)
void
take(int upper)
protected Object
typesafeObservers(Object observers)
void
unbindInput()
Disconnects thisInlet
from its inputOutlet
, if connected.void
unbindOutput(Inlet<? super MapLane<K,V>> output)
Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.void
unbindOutputs()
Disconnects all outputs from thisOutlet
by invokingInlet.unbindInput()
on eachInelt
that depends on the state of thisOutlet
.MapLaneView<K,V>
unobserve(Object observer)
<V2> MapLaneView<K,V2>
valueClass(Class<V2> valueClass)
Form<V>
valueForm()
<V2> MapLaneView<K,V2>
valueForm(Form<V2> valueForm)
Cursor<V>
valueIterator()
Collection<V>
values()
MapLaneView<K,V>
willClear(WillClear willClear)
MapLaneView<K,V>
willCommand(WillCommand willCommand)
MapLaneView<K,V>
willDrop(WillDrop willDrop)
MapLaneView<K,V>
willEnter(WillEnter willEnter)
protected void
willInvalidate()
protected void
willInvalidateKey(K key, KeyEffect effect)
MapLaneView<K,V>
willLeave(WillLeave willLeave)
protected void
willLoad()
protected void
willReconcile(int version)
protected void
willReconcileKey(K key, KeyEffect effect, int version)
MapLaneView<K,V>
willRemove(WillRemoveKey<K> willRemove)
MapLaneView<K,V>
willTake(WillTake willTake)
protected void
willUpdate(int version)
MapLaneView<K,V>
willUpdate(WillUpdateKey<K,V> willUpdate)
MapLaneView<K,V>
willUplink(WillUplink willUplink)
-
Methods inherited from class swim.runtime.warp.WarpLaneView
dispatchDidCommand, dispatchDidEnter, dispatchDidLeave, dispatchDidUplink, dispatchWillCommand, dispatchWillEnter, dispatchWillLeave, dispatchWillUplink, laneDidCommand, laneDidEnter, laneDidLeave, laneDidUplink, laneWillCommand, laneWillEnter, laneWillLeave, laneWillUplink
-
Methods inherited from class swim.runtime.LaneView
bindDownlink, cellAddress, closeDownlink, debug, edgeName, error, fail, hostUri, info, laneContext, laneDidFail, laneUri, meshUri, nodeUri, openDownlink, openMetaDownlink, policy, pushDown, reportDown, schedule, stage, store, tierContext, trace, unwrapLane, warn
-
Methods inherited from class swim.runtime.AbstractTierBinding
activate, didClose, didFail, didLoad, didOpen, didStart, didStop, didUnload, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload, willClose, willOpen, willStart, willStop, willUnload
-
Methods inherited from class swim.runtime.AbstractSwimRef
command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
agentContext
protected final AgentContext agentContext
-
flags
protected int flags
-
laneBinding
protected MapLaneModel laneBinding
-
effects
protected HashTrieMap<K,KeyEffect> effects
-
outlets
protected HashTrieMap<K,KeyOutlet<K,V>> outlets
-
version
protected int version
-
-
Constructor Detail
-
MapLaneView
public MapLaneView(AgentContext agentContext, Form<K> keyForm, Form<V> valueForm)
-
-
Method Detail
-
agentContext
public AgentContext agentContext()
- Specified by:
agentContext
in classLaneView
-
laneBinding
public MapLaneModel laneBinding()
- Specified by:
laneBinding
in classLaneView
-
createLaneBinding
public MapLaneModel createLaneBinding()
- Specified by:
createLaneBinding
in classLaneView
-
keyForm
public <K2> MapLaneView<K2,V> keyForm(Form<K2> keyForm)
-
keyClass
public <K2> MapLaneView<K2,V> keyClass(Class<K2> keyClass)
-
valueForm
public <V2> MapLaneView<K,V2> valueForm(Form<V2> valueForm)
-
valueClass
public <V2> MapLaneView<K,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceMapLane<K,V>
-
isResident
public final boolean isResident()
- Specified by:
isResident
in interfaceMapLane<K,V>
-
isResident
public MapLaneView<K,V> isResident(boolean isResident)
- Specified by:
isResident
in interfaceMapLane<K,V>
-
isTransient
public final boolean isTransient()
- Specified by:
isTransient
in interfaceMapLane<K,V>
-
isTransient
public MapLaneView<K,V> isTransient(boolean isTransient)
- Specified by:
isTransient
in interfaceMapLane<K,V>
-
willLoad
protected void willLoad()
- Overrides:
willLoad
in classAbstractTierBinding
-
close
public void close()
-
observe
public MapLaneView<K,V> observe(Object observer)
- Specified by:
observe
in interfaceLane
- Specified by:
observe
in interfaceMapLane<K,V>
- Specified by:
observe
in interfaceObservable<K>
- Specified by:
observe
in interfaceObservableMap<K,V>
- Specified by:
observe
in interfaceObservableSortedMap<K,V>
- Specified by:
observe
in interfaceWarpLane
- Overrides:
observe
in classWarpLaneView
-
unobserve
public MapLaneView<K,V> unobserve(Object observer)
- Specified by:
unobserve
in interfaceLane
- Specified by:
unobserve
in interfaceMapLane<K,V>
- Specified by:
unobserve
in interfaceObservable<K>
- Specified by:
unobserve
in interfaceObservableMap<K,V>
- Specified by:
unobserve
in interfaceObservableSortedMap<K,V>
- Specified by:
unobserve
in interfaceWarpLane
- Overrides:
unobserve
in classWarpLaneView
-
willUpdate
public MapLaneView<K,V> willUpdate(WillUpdateKey<K,V> willUpdate)
- Specified by:
willUpdate
in interfaceMapLane<K,V>
- Specified by:
willUpdate
in interfaceObservableMap<K,V>
-
didUpdate
public MapLaneView<K,V> didUpdate(DidUpdateKey<K,V> didUpdate)
-
willRemove
public MapLaneView<K,V> willRemove(WillRemoveKey<K> willRemove)
- Specified by:
willRemove
in interfaceMapLane<K,V>
- Specified by:
willRemove
in interfaceObservableMap<K,V>
-
didRemove
public MapLaneView<K,V> didRemove(DidRemoveKey<K,V> didRemove)
-
willDrop
public MapLaneView<K,V> willDrop(WillDrop willDrop)
-
didDrop
public MapLaneView<K,V> didDrop(DidDrop didDrop)
-
willTake
public MapLaneView<K,V> willTake(WillTake willTake)
-
didTake
public MapLaneView<K,V> didTake(DidTake didTake)
-
willClear
public MapLaneView<K,V> willClear(WillClear willClear)
-
didClear
public MapLaneView<K,V> didClear(DidClear didClear)
-
willCommand
public MapLaneView<K,V> willCommand(WillCommand willCommand)
- Specified by:
willCommand
in interfaceMapLane<K,V>
- Specified by:
willCommand
in interfaceWarpLane
- Specified by:
willCommand
in classWarpLaneView
-
didCommand
public MapLaneView<K,V> didCommand(DidCommand didCommand)
- Specified by:
didCommand
in interfaceMapLane<K,V>
- Specified by:
didCommand
in interfaceWarpLane
- Specified by:
didCommand
in classWarpLaneView
-
willUplink
public MapLaneView<K,V> willUplink(WillUplink willUplink)
- Specified by:
willUplink
in interfaceMapLane<K,V>
- Specified by:
willUplink
in interfaceWarpLane
- Specified by:
willUplink
in classWarpLaneView
-
didUplink
public MapLaneView<K,V> didUplink(DidUplink didUplink)
-
willEnter
public MapLaneView<K,V> willEnter(WillEnter willEnter)
-
didEnter
public MapLaneView<K,V> didEnter(DidEnter didEnter)
-
willLeave
public MapLaneView<K,V> willLeave(WillLeave willLeave)
-
didLeave
public MapLaneView<K,V> didLeave(DidLeave didLeave)
-
dispatchWillUpdate
public Map.Entry<Boolean,V> dispatchWillUpdate(Link link, K key, V newValue, boolean preemptive)
-
dispatchDidUpdate
public boolean dispatchDidUpdate(Link link, K key, V newValue, V oldValue, boolean preemptive)
-
dispatchDidRemove
public boolean dispatchDidRemove(Link link, K key, V oldValue, boolean preemptive)
-
dispatchWillDrop
public boolean dispatchWillDrop(Link link, int lower, boolean preemptive)
-
dispatchDidDrop
public boolean dispatchDidDrop(Link link, int lower, boolean preemptive)
-
dispatchWillTake
public boolean dispatchWillTake(Link link, int upper, boolean preemptive)
-
dispatchDidTake
public boolean dispatchDidTake(Link link, int upper, boolean preemptive)
-
dispatchWillClear
public boolean dispatchWillClear(Link link, boolean preemptive)
-
dispatchDidClear
public boolean dispatchDidClear(Link link, boolean preemptive)
-
laneWillRemove
public void laneWillRemove(K key)
-
laneWillDrop
public void laneWillDrop(int lower)
-
laneDidDrop
public void laneDidDrop(int lower)
-
laneWillTake
public void laneWillTake(int upper)
-
laneDidTake
public void laneDidTake(int upper)
-
laneWillClear
public void laneWillClear()
-
laneDidClear
public void laneDidClear()
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object key)
Description copied from interface:MapOutlet
Returnstrue
if the current state of thisMapOutlet
contains the givenkey
; otherwise returnsfalse
.- Specified by:
containsKey
in interfaceIterableMap<K,V>
- Specified by:
containsKey
in interfaceMap<K,V>
- Specified by:
containsKey
in interfaceMapOutlet<K,V,MapLane<K,V>>
- Specified by:
containsKey
in interfaceOrderedMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceIterableMap<K,V>
- Specified by:
containsValue
in interfaceMap<K,V>
- Specified by:
containsValue
in interfaceOrderedMap<K,V>
-
indexOf
public int indexOf(Object key)
- Specified by:
indexOf
in interfaceOrderedMap<K,V>
-
get
public V get(Object key)
Description copied from interface:MapOutlet
Returns the value assocaited with the givenkey
in the current state of thisMapOutlet
, if defined; otherwise returnsnull
.
-
getEntry
public Map.Entry<K,V> getEntry(Object key)
- Specified by:
getEntry
in interfaceOrderedMap<K,V>
-
getIndex
public Map.Entry<K,V> getIndex(int index)
- Specified by:
getIndex
in interfaceOrderedMap<K,V>
-
firstEntry
public Map.Entry<K,V> firstEntry()
- Specified by:
firstEntry
in interfaceOrderedMap<K,V>
-
firstKey
public K firstKey()
-
firstValue
public V firstValue()
- Specified by:
firstValue
in interfaceOrderedMap<K,V>
-
lastKey
public K lastKey()
-
lastValue
public V lastValue()
- Specified by:
lastValue
in interfaceOrderedMap<K,V>
-
nextEntry
public Map.Entry<K,V> nextEntry(K key)
- Specified by:
nextEntry
in interfaceOrderedMap<K,V>
-
previousEntry
public Map.Entry<K,V> previousEntry(K key)
- Specified by:
previousEntry
in interfaceOrderedMap<K,V>
-
previousKey
public K previousKey(K key)
- Specified by:
previousKey
in interfaceOrderedMap<K,V>
-
previousValue
public V previousValue(K key)
- Specified by:
previousValue
in interfaceOrderedMap<K,V>
-
drop
public void drop(int lower)
- Specified by:
drop
in interfaceObservableSortedMap<K,V>
-
take
public void take(int upper)
- Specified by:
take
in interfaceObservableSortedMap<K,V>
-
clear
public void clear()
-
headMap
public OrderedMap<K,V> headMap(K toKey)
-
tailMap
public OrderedMap<K,V> tailMap(K fromKey)
-
subMap
public OrderedMap<K,V> subMap(K fromKey, K toKey)
-
values
public Collection<V> values()
-
iterator
public OrderedMapCursor<K,V> iterator()
-
keyIterator
public Cursor<K> keyIterator()
Description copied from interface:MapOutlet
Returns anIterator
over the keys in the current state of thisMapOutlet
.- Specified by:
keyIterator
in interfaceIterableMap<K,V>
- Specified by:
keyIterator
in interfaceMapLane<K,V>
- Specified by:
keyIterator
in interfaceMapOutlet<K,V,MapLane<K,V>>
- Specified by:
keyIterator
in interfaceOrderedMap<K,V>
-
valueIterator
public Cursor<V> valueIterator()
- Specified by:
valueIterator
in interfaceIterableMap<K,V>
- Specified by:
valueIterator
in interfaceOrderedMap<K,V>
-
comparator
public Comparator<? super K> comparator()
- Specified by:
comparator
in interfaceOrderedMap<K,V>
- Specified by:
comparator
in interfaceSortedMap<K,V>
-
get
public MapLane<K,V> get()
Description copied from interface:Outlet
Returns the current state of thisOutlet
.
-
input
public MapOutlet<K,V,? extends Map<K,V>> input()
Description copied from interface:Inlet
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.
-
bindInput
public void bindInput(Outlet<? extends Map<K,V>> input)
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<K>
-
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<K>
- Specified by:
disconnectInputs
in interfaceOutlet<K>
-
outlet
public Outlet<V> outlet(K key)
Description copied from interface:MapOutlet
Returns anOutlet
that updates when the specifiedkey
updates.
-
outputIterator
public Iterator<Inlet<? super MapLane<K,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<K>
-
bindOutput
public void bindOutput(Inlet<? super MapLane<K,V>> output)
Description copied from interface:Outlet
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
. Theoutput
will be invalidated when the state of thisOutlet
is invalidated, and updated when thisOutlet
is updated.- Specified by:
bindOutput
in interfaceOutlet<K>
-
unbindOutput
public void unbindOutput(Inlet<? super MapLane<K,V>> output)
Description copied from interface:Outlet
Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.- Specified by:
unbindOutput
in interfaceOutlet<K>
-
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<K>
-
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<K>
- Specified by:
disconnectOutputs
in interfaceOutlet<K>
-
invalidateOutputKey
public void invalidateOutputKey(K key, KeyEffect effect)
Description copied from interface:MapInlet
Marks thisMapInlet
as needing aneffect
applied to a givenkey
. Invalidating an individual key invalidates the entire state of theInlet
. But only the invalidated keys need to be updated in order to reconcile the overall state of theInlet
.
-
invalidateInputKey
public void invalidateInputKey(K key, KeyEffect effect)
Description copied from interface:MapOutlet
Marks thisMapOutlet
as needing aneffect
applied to a givenkey
. Invalidating an individual key invalidates the entire state of theOutlet
. But only the invalidated keys need to be updated in order to reconcile the overall state of theOutlet
.
-
invalidateOutput
public void invalidateOutput()
Description copied from interface:Inlet
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having stale state. Invalidating anInlet
will recursively invalidate all streamlets that transitively depend on the state of thisInlet
. Invalidating anInlet
does not cause its state to be recomputed. A subsequentInlet.reconcileOutput(int)
call will reconcile the state of theInlet
.- Specified by:
invalidateOutput
in interfaceInlet<K>
-
invalidateInput
public void invalidateInput()
Description copied from interface:Outlet
- Specified by:
invalidateInput
in interfaceOutlet<K>
-
invalidate
public void invalidate()
-
reconcileOutputKey
public void reconcileOutputKey(K key, int version)
Description copied from interface:MapInlet
Reconciles the state of an individualkey
in thisMapInlet
, if the version of thisMapInlet
's state differs from the targetversion
. To reconcile the state of a key, theMapInlet
first invokesMapOutlet.reconcileInputKey(Object, int)
on itsinput
, if its input is aMapOutlet
, or it invokesOutlet.reconcileInput(int)
, if its input is not aMapOutlet
. Then, if all invalid keys have been reconciled, theMapInlet
invokesStreamlet.reconcile(int)
on its attached streamlet.
-
reconcileInputKey
public void reconcileInputKey(K key, int version)
Description copied from interface:MapOutlet
Reconciles the state of an individualkey
in thisMapOutlet
, if the version of thisMapOutlet
's state differs from the targetversion
. To reconcile the state of a key, theMapOutlet
first invokesStreamlet.reconcile(int)
on its attached streamlets. Then, for each dependent output, it invokesMapInlet.reconcileOutputKey(Object, int)
, if the dependent output is aMapInlet
, or it invokesInlet.reconcileOutput(int)
, if the dependent output is not aMapInlet
.
-
reconcileKey
public void reconcileKey(K key, int version)
-
reconcileOutput
public void reconcileOutput(int version)
Description copied from interface:Inlet
Reconciles the state of thisInlet
, if the version of thisInlet
's state differs from the targetversion
. To reconcile its state, theInlet
first invokesOutlet.reconcileInput(int)
on itsinput
, to ensure that its input is up-to-date. It then invokesStreamlet.reconcile(int)
on theStreamlet
to which it's attached, causing theStreamlet
to reconcile its own state.- Specified by:
reconcileOutput
in interfaceInlet<K>
-
reconcileInput
public void reconcileInput(int version)
Description copied from interface:Outlet
Reconciles the state of thisOutlet
, if the version of thisOutlet
's state differs from the targetversion
. To reconcile its state, theOutlet
first invokesStreamlet.reconcile(int)
on theStreamlet
to which it's attached. It then invokesInlet.reconcileOutput(int)
on each of its dependentoutputs
.- Specified by:
reconcileInput
in interfaceOutlet<K>
-
reconcile
public void reconcile(int version)
-
willInvalidate
protected void willInvalidate()
-
onInvalidate
protected void onInvalidate()
-
didInvalidate
protected void didInvalidate()
-
willUpdate
protected void willUpdate(int version)
-
didUpdate
protected void didUpdate(int version)
-
willReconcile
protected void willReconcile(int version)
-
onReconcile
protected void onReconcile(int version)
-
didReconcile
protected void didReconcile(int version)
-
-