java.lang.Object
swim.system.AbstractWarpRef
swim.system.AbstractTierBinding
swim.system.LaneView
swim.system.warp.WarpLaneView
swim.system.lane.MapLaneView<K,V>
- All Implemented Interfaces:
Iterable<Map.Entry<K,,V>> Map<K,,V> SortedMap<K,,V> DownlinkFactory,Lane,MapLane<K,,V> WarpRef,WarpLane,Observable<Object>,ObservableIterableMap<K,,V> ObservableMap<K,,V> ObservableOrderedMap<K,,V> ObservableSortedMap<K,,V> Inlet<Map<K,,V>> MapInlet<K,,V, Map<K, V>> MapOutlet<K,,V, MapLane<K, V>> Outlet<MapLane<K,,V>> CellContext,TierBinding,IterableMap<K,,V> Log,OrderedMap<K,V>
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AgentContextprotected HashTrieMap<K,KeyEffect> protected intprotected MapLaneModelprotected HashTrieMap<K,KeyOutlet<K, V>> protected intFields inherited from class swim.system.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 -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidConnects thisInletto anOutletfrom which it will acquire its state.voidbindOutput(Inlet<? super MapLane<K, V>> output) Adds anoutputto the set ofInlets that depend on the state of thisOutlet.voidclear()voidclose()Comparator<? super K>booleancontainsKey(Object key) Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.booleancontainsValue(Object value) voiddecohere()voidMarks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.voiddecohereInputKey(K key, KeyEffect effect) Marks thisMapOutletas needing aneffectapplied to a givenkey.voiddecohereKey(K key, KeyEffect effect) voidMarks thisInlet—and theStreamletto which thisInletis attached—as having decoherent state.voiddecohereOutputKey(K key, KeyEffect effect) Marks thisMapInletas needing aneffectapplied to a givenkey.didCommand(DidCommand didCommand) protected voidprotected voiddidDecohereKey(K key, KeyEffect effect) protected voiddidRecohere(int version) protected voiddidRecohereKey(K key, KeyEffect effect, int version) didRemove(DidRemoveKey<K, V> didRemove) didUpdate(DidUpdateKey<K, V> didUpdate) voidDisconnects allInlets dominated by thisInletin the dataflow dependency graph.voidDisconnects allOutlets dominated by thisInletin the dataflow graph.booleandispatchDidClear(Link link, boolean preemptive) booleandispatchDidDrop(Link link, int lower, boolean preemptive) booleandispatchDidRemove(Link link, K key, V oldValue, boolean preemptive) booleandispatchDidTake(Link link, int upper, boolean preemptive) booleandispatchDidUpdate(Link link, K key, V newValue, V oldValue, boolean preemptive) booleandispatchWillClear(Link link, boolean preemptive) booleandispatchWillDrop(Link link, int lower, boolean preemptive) booleandispatchWillRemove(Link link, K key, boolean preemptive) booleandispatchWillTake(Link link, int upper, boolean preemptive) dispatchWillUpdate(Link link, K key, V newValue, boolean preemptive) voiddrop(int lower) entrySet()firstKey()get()Returns the current state of thisOutlet.Returns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.getIndex(int index) OrderedMap<K,V> intinput()Returns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.booleanisEmpty()final booleanisResident(boolean isResident) final booleanisTransient(boolean isTransient) iterator()<K2> MapLaneView<K2,V> keyForm()<K2> MapLaneView<K2,V> Returns anIteratorover the keys in the current state of thisMapOutlet.keySet()voidvoidlaneDidDrop(int lower) voidlaneDidRemove(K key, V oldValue) voidlaneDidTake(int upper) voidlaneDidUpdate(K key, V newValue, V oldValue) voidvoidlaneWillDrop(int lower) voidlaneWillRemove(K key) voidlaneWillTake(int upper) laneWillUpdate(K key, V newValue) lastKey()protected voidprotected voidonDecohereKey(K key, KeyEffect effect) protected voidonRecohere(int version) protected voidonRecohereKey(K key, KeyEffect effect, int version) Returns anOutletthat updates when the specifiedkeyupdates.Returns anIteratorover the set ofInlets that depend on the state of thisOutlet.previousEntry(K key) previousKey(K key) previousValue(K key) voidvoidrecohere(int version) voidrecohereInput(int version) Updates the state of thisOutletto make it consistent with the targetversion.voidrecohereInputKey(K key, int version) Updates the state of an individualkeyin thisMapOutletto make it consistent with the targetversion.voidrecohereKey(K key, int version) voidrecohereOutput(int version) Updates the state of thisInletto make it consistent with thetargetversion.voidrecohereOutputKey(K key, int version) Updates the state of an individualkeyin thisMapInletto make it consistent with the targetversion.voidsetKeyForm(Form<K> keyForm) voidsetValueForm(Form<V> valueForm) intsize()OrderedMap<K,V> snapshot()OrderedMap<K,V> OrderedMap<K,V> voidtake(int upper) protected ObjecttypesafeObservers(Object observers) voidDisconnects thisInletfrom its inputOutlet, if connected.voidunbindOutput(Inlet<? super MapLane<K, V>> output) Removes anoutputfrom the set ofInlets that depend on the state of thisOutlet.voidDisconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.<V2> MapLaneView<K,V2> valueClass(Class<V2> valueClass) <V2> MapLaneView<K,V2> values()willCommand(WillCommand willCommand) protected voidprotected voidwillDecohereKey(K key, KeyEffect effect) protected voidwillLoad()protected voidwillRecohere(int version) protected voidwillRecohereKey(K key, KeyEffect effect, int version) willRemove(WillRemoveKey<K> willRemove) willUpdate(WillUpdateKey<K, V> willUpdate) willUplink(WillUplink willUplink) Methods inherited from class swim.system.warp.WarpLaneView
dispatchDidCommand, dispatchDidEnter, dispatchDidLeave, dispatchDidUplink, dispatchWillCommand, dispatchWillEnter, dispatchWillLeave, dispatchWillUplink, laneDidCommand, laneDidEnter, laneDidLeave, laneDidUplink, laneWillCommand, laneWillEnter, laneWillLeave, laneWillUplinkMethods inherited from class swim.system.LaneView
bindDownlink, bottomLane, cellAddress, closeDownlink, debug, edgeName, error, fail, hostUri, info, laneContext, laneDidFail, laneUri, meshUri, nodeUri, openDownlink, openMetaDownlink, policy, pushDown, reportDown, schedule, stage, store, tierContext, trace, unwrapLane, warnMethods inherited from class swim.system.AbstractTierBinding
activate, awaitStart, didClose, didFail, didLoad, didOpen, didStart, didStop, didUnload, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload, willClose, willOpen, willStart, willStop, willUnloadMethods inherited from class swim.system.AbstractWarpRef
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, nodeRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
agentContext
-
keyForm
-
valueForm
-
laneBinding
-
dataView
-
flags
protected int flags -
input
-
effects
-
outlets
-
outputs
-
version
protected int version
-
-
Constructor Details
-
MapLaneView
-
-
Method Details
-
agentContext
- Specified by:
agentContextin classLaneView
-
laneBinding
- Specified by:
laneBindingin classLaneView
-
createLaneBinding
- Specified by:
createLaneBindingin classLaneView
-
keyForm
-
keyForm
-
keyClass
-
setKeyForm
-
valueForm
-
valueForm
-
valueClass
- Specified by:
valueClassin interfaceMapLane<K,V>
-
setValueForm
-
typesafeObservers
-
isResident
public final boolean isResident()- Specified by:
isResidentin interfaceMapLane<K,V>
-
isResident
- Specified by:
isResidentin interfaceMapLane<K,V>
-
isTransient
public final boolean isTransient()- Specified by:
isTransientin interfaceMapLane<K,V>
-
isTransient
- Specified by:
isTransientin interfaceMapLane<K,V>
-
willLoad
protected void willLoad()- Overrides:
willLoadin classAbstractTierBinding
-
close
public void close() -
observe
- Specified by:
observein interfaceLane- Specified by:
observein interfaceMapLane<K,V> - Specified by:
observein interfaceObservable<K>- Specified by:
observein interfaceObservableMap<K,V> - Specified by:
observein interfaceObservableSortedMap<K,V> - Specified by:
observein interfaceWarpLane- Overrides:
observein classWarpLaneView
-
unobserve
- Specified by:
unobservein interfaceLane- Specified by:
unobservein interfaceMapLane<K,V> - Specified by:
unobservein interfaceObservable<K>- Specified by:
unobservein interfaceObservableMap<K,V> - Specified by:
unobservein interfaceObservableSortedMap<K,V> - Specified by:
unobservein interfaceWarpLane- Overrides:
unobservein classWarpLaneView
-
willUpdate
- Specified by:
willUpdatein interfaceMapLane<K,V> - Specified by:
willUpdatein interfaceObservableMap<K,V>
-
didUpdate
-
willRemove
- Specified by:
willRemovein interfaceMapLane<K,V> - Specified by:
willRemovein interfaceObservableMap<K,V>
-
didRemove
-
willDrop
-
didDrop
-
willTake
-
didTake
-
willClear
-
didClear
-
willCommand
- Specified by:
willCommandin interfaceMapLane<K,V> - Specified by:
willCommandin interfaceWarpLane- Specified by:
willCommandin classWarpLaneView
-
didCommand
- Specified by:
didCommandin interfaceMapLane<K,V> - Specified by:
didCommandin interfaceWarpLane- Specified by:
didCommandin classWarpLaneView
-
willUplink
- Specified by:
willUplinkin interfaceMapLane<K,V> - Specified by:
willUplinkin interfaceWarpLane- Specified by:
willUplinkin classWarpLaneView
-
didUplink
-
willEnter
-
didEnter
-
willLeave
-
didLeave
-
dispatchWillUpdate
-
dispatchDidUpdate
-
dispatchWillRemove
-
dispatchDidRemove
-
dispatchWillDrop
-
dispatchDidDrop
-
dispatchWillTake
-
dispatchDidTake
-
dispatchWillClear
-
dispatchDidClear
-
laneWillUpdate
-
laneDidUpdate
-
laneWillRemove
-
laneDidRemove
-
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
Description copied from interface:MapOutletReturnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.- Specified by:
containsKeyin interfaceIterableMap<K,V> - Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceMapOutlet<K,V, MapLane<K, V>> - Specified by:
containsKeyin interfaceOrderedMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceIterableMap<K,V> - Specified by:
containsValuein interfaceMap<K,V> - Specified by:
containsValuein interfaceOrderedMap<K,V>
-
indexOf
- Specified by:
indexOfin interfaceOrderedMap<K,V>
-
get
Description copied from interface:MapOutletReturns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull. -
getEntry
- Specified by:
getEntryin interfaceOrderedMap<K,V>
-
getIndex
- Specified by:
getIndexin interfaceOrderedMap<K,V>
-
firstEntry
- Specified by:
firstEntryin interfaceOrderedMap<K,V>
-
firstKey
-
firstValue
- Specified by:
firstValuein interfaceOrderedMap<K,V>
-
lastEntry
- Specified by:
lastEntryin interfaceOrderedMap<K,V>
-
lastKey
-
lastValue
- Specified by:
lastValuein interfaceOrderedMap<K,V>
-
nextEntry
- Specified by:
nextEntryin interfaceOrderedMap<K,V>
-
nextKey
- Specified by:
nextKeyin interfaceOrderedMap<K,V>
-
nextValue
- Specified by:
nextValuein interfaceOrderedMap<K,V>
-
previousEntry
- Specified by:
previousEntryin interfaceOrderedMap<K,V>
-
previousKey
- Specified by:
previousKeyin interfaceOrderedMap<K,V>
-
previousValue
- Specified by:
previousValuein interfaceOrderedMap<K,V>
-
put
-
putAll
-
remove
-
drop
public void drop(int lower) - Specified by:
dropin interfaceObservableSortedMap<K,V>
-
take
public void take(int upper) - Specified by:
takein interfaceObservableSortedMap<K,V>
-
clear
public void clear() -
headMap
-
tailMap
-
subMap
-
entrySet
-
keySet
-
values
-
iterator
-
keyIterator
Description copied from interface:MapOutletReturns anIteratorover the keys in the current state of thisMapOutlet.- Specified by:
keyIteratorin interfaceIterableMap<K,V> - Specified by:
keyIteratorin interfaceMapLane<K,V> - Specified by:
keyIteratorin interfaceMapOutlet<K,V, MapLane<K, V>> - Specified by:
keyIteratorin interfaceOrderedMap<K,V>
-
valueIterator
- Specified by:
valueIteratorin interfaceIterableMap<K,V> - Specified by:
valueIteratorin interfaceOrderedMap<K,V>
-
snapshot
-
comparator
- Specified by:
comparatorin interfaceOrderedMap<K,V> - Specified by:
comparatorin interfaceSortedMap<K,V>
-
get
Description copied from interface:OutletReturns the current state of thisOutlet. -
input
Description copied from interface:InletReturns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected. -
bindInput
Description copied from interface:InletConnects thisInletto anOutletfrom which it will acquire its state. If thisInletis already connected, it will first disconnect from its existing input. Then, after updating itsinputproperty, theInletwill invokeOutlet.bindOutput(Inlet)on its newinput. -
bindInput
-
unbindInput
public void unbindInput()Description copied from interface:InletDisconnects thisInletfrom its inputOutlet, if connected. After setting itsinputproperty tonull, theInletwill invokeOutlet.unbindOutput(Inlet)on its old input, if defined.- Specified by:
unbindInputin interfaceInlet<K>
-
disconnectInputs
public void disconnectInputs()Description copied from interface:InletDisconnects allInlets dominated by thisInletin the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet.- Specified by:
disconnectInputsin interfaceInlet<K>- Specified by:
disconnectInputsin interfaceOutlet<K>
-
outlet
Description copied from interface:MapOutletReturns anOutletthat updates when the specifiedkeyupdates. -
outputIterator
Description copied from interface:OutletReturns anIteratorover the set ofInlets that depend on the state of thisOutlet.- Specified by:
outputIteratorin interfaceOutlet<K>
-
bindOutput
Description copied from interface:OutletAdds anoutputto the set ofInlets that depend on the state of thisOutlet. Theoutputwill be decohered when the state of thisOutletis decohered, and recohered when thisOutletis recohered.- Specified by:
bindOutputin interfaceOutlet<K>
-
unbindOutput
Description copied from interface:OutletRemoves anoutputfrom the set ofInlets that depend on the state of thisOutlet.- Specified by:
unbindOutputin interfaceOutlet<K>
-
unbindOutputs
public void unbindOutputs()Description copied from interface:OutletDisconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.- Specified by:
unbindOutputsin interfaceOutlet<K>
-
disconnectOutputs
public void disconnectOutputs()Description copied from interface:InletDisconnects allOutlets dominated by thisInletin the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet.- Specified by:
disconnectOutputsin interfaceInlet<K>- Specified by:
disconnectOutputsin interfaceOutlet<K>
-
decohereOutputKey
Description copied from interface:MapInletMarks thisMapInletas needing aneffectapplied to a givenkey. Decohering an individual key decoheres the entire state of theInlet. But only the decoherent keys need to be updated in order to recohere the overall state of theInlet. -
decohereInputKey
Description copied from interface:MapOutletMarks thisMapOutletas needing aneffectapplied to a givenkey. Decohering an individual key decoheres the entire state of theOutlet. But only the decoherent keys need to be updated in order to recohere the overall state of theOutlet. -
decohereKey
-
decohereOutput
public void decohereOutput()Description copied from interface:InletMarks thisInlet—and theStreamletto which thisInletis attached—as having decoherent state. Decohering anInletwill recursively decohere all streamlets that transitively depend on the state of thisInlet. Decohering anInletdoes not cause its state to be recomputed. A subsequentInlet.recohereOutput(int)call will eventually make the state of theInletcoherent again.- Specified by:
decohereOutputin interfaceInlet<K>
-
decohereInput
public void decohereInput()Description copied from interface:OutletMarks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.- Specified by:
decohereInputin interfaceOutlet<K>
-
decohere
public void decohere() -
recohereOutputKey
Description copied from interface:MapInletUpdates the state of an individualkeyin thisMapInletto make it consistent with the targetversion. TheMapInletonly needs to update if the currentversiondiffers from the targetversion. To update the state of a key, theMapInletfirst invokesMapOutlet.recohereInputKey(Object, int)on itsinput, if its input is aMapOutlet, or it invokesOutlet.recohereInput(int), if its input is not aMapOutlet. Then, if all decoherent keys have been recohered, theMapInletinvokesStreamlet.recohere(int)on its attached streamlet. -
recohereInputKey
Description copied from interface:MapOutletUpdates the state of an individualkeyin thisMapOutletto make it consistent with the targetversion. TheMapOutletonly needs to update if its currentversiondiffers from the targetversion. To update the state of a key, theMapOutletfirst invokesStreamlet.recohere(int)on its attached streamlets. Then, for each dependent output, it invokesMapInlet.recohereOutputKey(Object, int), if the dependent output is aMapInlet, or it invokesInlet.recohereOutput(int), if the dependent output is not aMapInlet. -
recohereKey
-
recohereOutput
public void recohereOutput(int version) Description copied from interface:InletUpdates the state of thisInletto make it consistent with thetargetversion. TheInletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theInletfirst invokesOutlet.recohereInput(int)on itsinput, to ensure that its input is coherent. It then invokesStreamlet.recohere(int)on theStreamletto which it's attached, causing theStreamletto make its own state coherent again.- Specified by:
recohereOutputin interfaceInlet<K>
-
recohereInput
public void recohereInput(int version) Description copied from interface:OutletUpdates the state of thisOutletto make it consistent with the targetversion. TheOutletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theOutletfirst invokesStreamlet.recohere(int)on theStreamletto which it's attached. It then invokesInlet.recohereOutput(int)on each of its dependentoutputs.- Specified by:
recohereInputin interfaceOutlet<K>
-
recohere
public void recohere(int version) -
willDecohereKey
-
onDecohereKey
-
didDecohereKey
-
willDecohere
protected void willDecohere() -
onDecohere
protected void onDecohere() -
didDecohere
protected void didDecohere() -
willRecohereKey
-
onRecohereKey
-
didRecohereKey
-
willRecohere
protected void willRecohere(int version) -
onRecohere
protected void onRecohere(int version) -
didRecohere
protected void didRecohere(int version)
-