- java.lang.Object
-
- swim.runtime.DownlinkView
-
- swim.runtime.warp.WarpDownlinkView
-
- swim.runtime.downlink.MapDownlinkView<K,V>
-
- All Implemented Interfaces:
Iterable<Map.Entry<K,V>>,Map<K,V>,SortedMap<K,V>,Downlink,MapDownlink<K,V>,Link,WarpDownlink,WarpLink,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,MapDownlink<K,V>>,Outlet<MapDownlink<K,V>>,IterableMap<K,V>,Log,OrderedMap<K,V>
- Direct Known Subclasses:
JoinMapLaneDownlink
public class MapDownlinkView<K,V> extends WarpDownlinkView implements MapDownlink<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected HashTrieMap<K,KeyEffect>effectsprotected MapOutlet<K,V,? extends Map<K,V>>inputprotected Form<K>keyFormprotected MapDownlinkModelmodelprotected HashTrieMap<K,KeyOutlet<K,V>>outletsprotected Inlet<? super MapDownlink<K,V>>[]outputsprotected static intSTATEFULprotected Form<V>valueFormprotected intversion-
Fields inherited from class swim.runtime.warp.WarpDownlinkView
body, flags, hostUri, KEEP_LINKED, KEEP_SYNCED, laneUri, meshUri, nodeUri, prio, rate
-
Fields inherited from class swim.runtime.DownlinkView
cellContext, observers, stage
-
-
Constructor Summary
Constructors Constructor Description MapDownlinkView(CellContext cellContext, Stage stage, Uri meshUri, Uri hostUri, Uri nodeUri, Uri laneUri, float prio, float rate, Value body, int flags, Form<K> keyForm, Form<V> valueForm, Object observers)MapDownlinkView(CellContext cellContext, Stage stage, Uri meshUri, Uri hostUri, Uri nodeUri, Uri laneUri, float prio, float rate, Value body, Form<K> keyForm, Form<V> valueForm)
-
Method Summary
Modifier and Type Method Description voidbindInput(MapOutlet<K,V,? extends Map<K,V>> input)voidbindInput(Outlet<? extends Map<K,V>> input)Connects thisInletto anOutletfrom which it will acquire its state.voidbindOutput(Inlet<? super MapDownlink<K,V>> output)Adds anoutputto the set ofInlets that depend on the state of thisOutlet.MapDownlinkView<K,V>body(Value body)voidclear()Comparator<? super K>comparator()booleancontainsKey(Object keyObject)Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.booleancontainsValue(Object valueObject)MapDownlinkModelcreateDownlinkModel()MapDownlinkView<K,V>didClear(DidClear didClear)MapDownlinkView<K,V>didClose(DidClose didClose)MapDownlinkView<K,V>didConnect(DidConnect didConnect)MapDownlinkView<K,V>didDisconnect(DidDisconnect didDisconnect)MapDownlink<K,V>didDrop(DidDrop didDrop)MapDownlinkView<K,V>didFail(DidFail didFail)protected voiddidInvalidate()protected voiddidInvalidateKey(K key, KeyEffect effect)MapDownlinkView<K,V>didLink(DidLink didLink)MapDownlinkView<K,V>didReceive(DidReceive didReceive)protected voiddidReconcile(int version)protected voiddidReconcileKey(K key, KeyEffect effect, int version)MapDownlinkView<K,V>didRemove(DidRemoveKey<K,V> didRemove)MapDownlinkView<K,V>didSync(DidSync didSync)MapDownlink<K,V>didTake(DidTake didTake)MapDownlinkView<K,V>didUnlink(DidUnlink didUnlink)protected voiddidUpdate(int version)MapDownlinkView<K,V>didUpdate(DidUpdateKey<K,V> didUpdate)voiddisconnectInputs()Disconnects allInlets dominated by thisInletin the dataflow dependency graph.voiddisconnectOutputs()Disconnects allOutlets dominated by thisInletin the dataflow graph.booleandispatchDidClear(boolean preemptive)booleandispatchDidDrop(int lower, boolean preemptive)booleandispatchDidRemove(K key, V oldValue, boolean preemptive)booleandispatchDidTake(int upper, boolean preemptive)booleandispatchDidUpdate(K key, V newValue, V oldValue, boolean preemptive)booleandispatchWillClear(boolean preemptive)booleandispatchWillDrop(int lower, boolean preemptive)booleandispatchWillRemove(K key, boolean preemptive)booleandispatchWillTake(int upper, boolean preemptive)Map.Entry<Boolean,V>dispatchWillUpdate(K key, V newValue, boolean preemptive)voiddownlinkDidClear()voiddownlinkDidDrop(int lower)voiddownlinkDidRemove(K key, V oldValue)voiddownlinkDidRemoveValue(Value key, Value oldValue)voiddownlinkDidTake(int upper)voiddownlinkDidUpdate(K key, V newValue, V oldValue)voiddownlinkDidUpdateValue(Value key, Value newValue, Value oldValue)MapDownlinkModeldownlinkModel()voiddownlinkWillClear()voiddownlinkWillDrop(int lower)voiddownlinkWillRemove(K key)voiddownlinkWillRemoveValue(Value key)voiddownlinkWillTake(int upper)VdownlinkWillUpdate(K key, V newValue)ValuedownlinkWillUpdateValue(Value key, Value newValue)voiddrop(int lower)Set<Map.Entry<K,V>>entrySet()Map.Entry<K,V>firstEntry()KfirstKey()VfirstValue()MapDownlink<K,V>get()Returns the current state of thisOutlet.Vget(Object keyObject)Returns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.Map.Entry<K,V>getEntry(Object keyObject)Map.Entry<K,V>getIndex(int index)OrderedMap<K,V>headMap(K toKeyObject)MapDownlinkView<K,V>hostUri(String hostUri)MapDownlinkView<K,V>hostUri(Uri hostUri)intindexOf(Object keyObject)MapOutlet<K,V,? extends Map<K,V>>input()Returns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.voidinvalidate()voidinvalidateInput()voidinvalidateInputKey(K key, KeyEffect effect)Marks thisMapOutletas needing aneffectapplied to a givenkey.voidinvalidateKey(K key, KeyEffect effect)voidinvalidateOutput()Marks thisInlet—and theStreamletto which thisInletis attached—as having stale state.voidinvalidateOutputKey(K key, KeyEffect effect)Marks thisMapInletas needing aneffectapplied to a givenkey.booleanisEmpty()booleanisStateful()MapDownlinkView<K,V>isStateful(boolean isStateful)OrderedMapCursor<K,V>iterator()MapDownlinkView<K,V>keepLinked(boolean keepLinked)MapDownlinkView<K,V>keepSynced(boolean keepSynced)<K2> MapDownlinkView<K2,V>keyClass(Class<K2> keyClass)Form<K>keyForm()<K2> MapDownlinkView<K2,V>keyForm(Form<K2> keyForm)Cursor<K>keyIterator()Returns anIteratorover the keys in the current state of thisMapOutlet.Set<K>keySet()MapDownlinkView<K,V>laneUri(String laneUri)MapDownlinkView<K,V>laneUri(Uri laneUri)Map.Entry<K,V>lastEntry()KlastKey()VlastValue()Map.Entry<K,V>nextEntry(Object keyObject)KnextKey(Object keyObject)VnextValue(Object keyObject)MapDownlinkView<K,V>nodeUri(String nodeUri)MapDownlinkView<K,V>nodeUri(Uri nodeUri)MapDownlinkView<K,V>observe(Object observer)protected voidonInvalidate()protected voidonInvalidateKey(K key, KeyEffect effect)protected voidonReconcile(int version)protected voidonReconcileKey(K key, KeyEffect effect, int version)MapDownlinkView<K,V>open()Outlet<V>outlet(K key)Returns anOutletthat updates when the specifiedkeyupdates.Iterator<Inlet<? super MapDownlink<K,V>>>outputIterator()Returns anIteratorover the set ofInlets that depend on the state of thisOutlet.Map.Entry<K,V>previousEntry(Object keyObject)KpreviousKey(Object keyObject)VpreviousValue(Object keyObject)MapDownlinkView<K,V>prio(float prio)Vput(K key, V value)voidputAll(Map<? extends K,? extends V> map)MapDownlinkView<K,V>rate(float rate)voidreconcile(int version)voidreconcileInput(int version)Reconciles the state of thisOutlet, if the version of thisOutlet's state differs from the targetversion.voidreconcileInputKey(K key, int version)Reconciles the state of an individualkeyin thisMapOutlet, if the version of thisMapOutlet's state differs from the targetversion.voidreconcileKey(K key, int version)voidreconcileOutput(int version)Reconciles the state of thisInlet, if the version of thisInlet's state differs from the targetversion.voidreconcileOutputKey(K key, int version)Reconciles the state of an individualkeyin thisMapInlet, if the version of thisMapInlet's state differs from the targetversion.Vremove(Object key)intsize()OrderedMap<K,V>subMap(K fromKeyObject, K toKeyObject)OrderedMap<K,V>tailMap(K fromKeyObject)voidtake(int upper)protected ObjecttypesafeObservers(Object observers)voidunbindInput()Disconnects thisInletfrom its inputOutlet, if connected.voidunbindOutput(Inlet<? super MapDownlink<K,V>> output)Removes anoutputfrom the set ofInlets that depend on the state of thisOutlet.voidunbindOutputs()Disconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.MapDownlinkView<K,V>unobserve(Object observer)<V2> MapDownlinkView<K,V2>valueClass(Class<V2> valueClass)Form<V>valueForm()<V2> MapDownlinkView<K,V2>valueForm(Form<V2> valueForm)Cursor<V>valueIterator()Collection<V>values()MapDownlinkView<K,V>willClear(WillClear willClear)MapDownlinkView<K,V>willCommand(WillCommand willCommand)MapDownlink<K,V>willDrop(WillDrop willDrop)protected voidwillInvalidate()protected voidwillInvalidateKey(K key, KeyEffect effect)MapDownlinkView<K,V>willLink(WillLink willLink)MapDownlinkView<K,V>willReceive(WillReceive willReceive)protected voidwillReconcile(int version)protected voidwillReconcileKey(K key, KeyEffect effect, int version)MapDownlinkView<K,V>willRemove(WillRemoveKey<K> willRemove)MapDownlinkView<K,V>willSync(WillSync willSync)MapDownlink<K,V>willTake(WillTake willTake)MapDownlinkView<K,V>willUnlink(WillUnlink willUnlink)protected voidwillUpdate(int version)MapDownlinkView<K,V>willUpdate(WillUpdateKey<K,V> willUpdate)-
Methods inherited from class swim.runtime.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.runtime.DownlinkView
cellContext, cipherSuite, close, 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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface swim.api.Link
cipherSuite, close, hostUri, isConnected, isRemote, isSecure, laneUri, localAddress, localCertificates, localIdentity, localPrincipal, nodeUri, remoteAddress, remoteCertificates, remoteIdentity, remotePrincipal, securityProtocol
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from interface swim.api.warp.WarpDownlink
body, command, command, command, command, keepLinked, keepSynced, prio, rate
-
-
-
-
Field Detail
-
STATEFUL
protected static final int STATEFUL
- See Also:
- Constant Field Values
-
model
protected MapDownlinkModel model
-
effects
protected HashTrieMap<K,KeyEffect> effects
-
outlets
protected HashTrieMap<K,KeyOutlet<K,V>> outlets
-
outputs
protected Inlet<? super MapDownlink<K,V>>[] outputs
-
version
protected int version
-
-
Method Detail
-
downlinkModel
public MapDownlinkModel downlinkModel()
- Specified by:
downlinkModelin classWarpDownlinkView
-
hostUri
public MapDownlinkView<K,V> hostUri(Uri hostUri)
- Specified by:
hostUriin interfaceMapDownlink<K,V>- Specified by:
hostUriin interfaceWarpDownlink- Specified by:
hostUriin classWarpDownlinkView
-
hostUri
public MapDownlinkView<K,V> hostUri(String hostUri)
- Specified by:
hostUriin interfaceMapDownlink<K,V>- Specified by:
hostUriin interfaceWarpDownlink- Specified by:
hostUriin classWarpDownlinkView
-
nodeUri
public MapDownlinkView<K,V> nodeUri(Uri nodeUri)
- Specified by:
nodeUriin interfaceMapDownlink<K,V>- Specified by:
nodeUriin interfaceWarpDownlink- Specified by:
nodeUriin classWarpDownlinkView
-
nodeUri
public MapDownlinkView<K,V> nodeUri(String nodeUri)
- Specified by:
nodeUriin interfaceMapDownlink<K,V>- Specified by:
nodeUriin interfaceWarpDownlink- Specified by:
nodeUriin classWarpDownlinkView
-
laneUri
public MapDownlinkView<K,V> laneUri(Uri laneUri)
- Specified by:
laneUriin interfaceMapDownlink<K,V>- Specified by:
laneUriin interfaceWarpDownlink- Specified by:
laneUriin classWarpDownlinkView
-
laneUri
public MapDownlinkView<K,V> laneUri(String laneUri)
- Specified by:
laneUriin interfaceMapDownlink<K,V>- Specified by:
laneUriin interfaceWarpDownlink- Specified by:
laneUriin classWarpDownlinkView
-
prio
public MapDownlinkView<K,V> prio(float prio)
- Specified by:
prioin interfaceMapDownlink<K,V>- Specified by:
prioin interfaceWarpDownlink- Specified by:
prioin classWarpDownlinkView
-
rate
public MapDownlinkView<K,V> rate(float rate)
- Specified by:
ratein interfaceMapDownlink<K,V>- Specified by:
ratein interfaceWarpDownlink- Specified by:
ratein classWarpDownlinkView
-
body
public MapDownlinkView<K,V> body(Value body)
- Specified by:
bodyin interfaceMapDownlink<K,V>- Specified by:
bodyin interfaceWarpDownlink- Specified by:
bodyin classWarpDownlinkView
-
keepLinked
public MapDownlinkView<K,V> keepLinked(boolean keepLinked)
- Specified by:
keepLinkedin interfaceMapDownlink<K,V>- Specified by:
keepLinkedin interfaceWarpDownlink- Specified by:
keepLinkedin classWarpDownlinkView
-
keepSynced
public MapDownlinkView<K,V> keepSynced(boolean keepSynced)
- Specified by:
keepSyncedin interfaceMapDownlink<K,V>- Specified by:
keepSyncedin interfaceWarpDownlink- Specified by:
keepSyncedin classWarpDownlinkView
-
isStateful
public final boolean isStateful()
- Specified by:
isStatefulin interfaceMapDownlink<K,V>
-
isStateful
public MapDownlinkView<K,V> isStateful(boolean isStateful)
- Specified by:
isStatefulin interfaceMapDownlink<K,V>
-
keyForm
public <K2> MapDownlinkView<K2,V> keyForm(Form<K2> keyForm)
- Specified by:
keyFormin interfaceMapDownlink<K,V>
-
keyClass
public <K2> MapDownlinkView<K2,V> keyClass(Class<K2> keyClass)
- Specified by:
keyClassin interfaceMapDownlink<K,V>
-
valueForm
public <V2> MapDownlinkView<K,V2> valueForm(Form<V2> valueForm)
- Specified by:
valueFormin interfaceMapDownlink<K,V>
-
valueClass
public <V2> MapDownlinkView<K,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClassin interfaceMapDownlink<K,V>
-
observe
public MapDownlinkView<K,V> observe(Object observer)
- Specified by:
observein interfaceDownlink- Specified by:
observein interfaceLink- Specified by:
observein interfaceMapDownlink<K,V>- Specified by:
observein interfaceObservable<K>- Specified by:
observein interfaceObservableMap<K,V>- Specified by:
observein interfaceObservableSortedMap<K,V>- Specified by:
observein interfaceWarpDownlink- Overrides:
observein classWarpDownlinkView
-
unobserve
public MapDownlinkView<K,V> unobserve(Object observer)
- Specified by:
unobservein interfaceDownlink- Specified by:
unobservein interfaceLink- Specified by:
unobservein interfaceMapDownlink<K,V>- Specified by:
unobservein interfaceObservable<K>- Specified by:
unobservein interfaceObservableMap<K,V>- Specified by:
unobservein interfaceObservableSortedMap<K,V>- Specified by:
unobservein interfaceWarpDownlink- Overrides:
unobservein classWarpDownlinkView
-
willUpdate
public MapDownlinkView<K,V> willUpdate(WillUpdateKey<K,V> willUpdate)
- Specified by:
willUpdatein interfaceMapDownlink<K,V>- Specified by:
willUpdatein interfaceObservableMap<K,V>
-
didUpdate
public MapDownlinkView<K,V> didUpdate(DidUpdateKey<K,V> didUpdate)
- Specified by:
didUpdatein interfaceMapDownlink<K,V>- Specified by:
didUpdatein interfaceObservableMap<K,V>
-
willRemove
public MapDownlinkView<K,V> willRemove(WillRemoveKey<K> willRemove)
- Specified by:
willRemovein interfaceMapDownlink<K,V>- Specified by:
willRemovein interfaceObservableMap<K,V>
-
didRemove
public MapDownlinkView<K,V> didRemove(DidRemoveKey<K,V> didRemove)
- Specified by:
didRemovein interfaceMapDownlink<K,V>- Specified by:
didRemovein interfaceObservableMap<K,V>
-
willDrop
public MapDownlink<K,V> willDrop(WillDrop willDrop)
- Specified by:
willDropin interfaceMapDownlink<K,V>- Specified by:
willDropin interfaceObservableSortedMap<K,V>
-
didDrop
public MapDownlink<K,V> didDrop(DidDrop didDrop)
- Specified by:
didDropin interfaceMapDownlink<K,V>- Specified by:
didDropin interfaceObservableSortedMap<K,V>
-
willTake
public MapDownlink<K,V> willTake(WillTake willTake)
- Specified by:
willTakein interfaceMapDownlink<K,V>- Specified by:
willTakein interfaceObservableSortedMap<K,V>
-
didTake
public MapDownlink<K,V> didTake(DidTake didTake)
- Specified by:
didTakein interfaceMapDownlink<K,V>- Specified by:
didTakein interfaceObservableSortedMap<K,V>
-
willClear
public MapDownlinkView<K,V> willClear(WillClear willClear)
- Specified by:
willClearin interfaceMapDownlink<K,V>- Specified by:
willClearin interfaceObservableMap<K,V>
-
didClear
public MapDownlinkView<K,V> didClear(DidClear didClear)
- Specified by:
didClearin interfaceMapDownlink<K,V>- Specified by:
didClearin interfaceObservableMap<K,V>
-
willReceive
public MapDownlinkView<K,V> willReceive(WillReceive willReceive)
- Specified by:
willReceivein interfaceMapDownlink<K,V>- Specified by:
willReceivein interfaceWarpDownlink- Specified by:
willReceivein classWarpDownlinkView
-
didReceive
public MapDownlinkView<K,V> didReceive(DidReceive didReceive)
- Specified by:
didReceivein interfaceMapDownlink<K,V>- Specified by:
didReceivein interfaceWarpDownlink- Specified by:
didReceivein classWarpDownlinkView
-
willCommand
public MapDownlinkView<K,V> willCommand(WillCommand willCommand)
- Specified by:
willCommandin interfaceMapDownlink<K,V>- Specified by:
willCommandin interfaceWarpDownlink- Specified by:
willCommandin classWarpDownlinkView
-
willLink
public MapDownlinkView<K,V> willLink(WillLink willLink)
- Specified by:
willLinkin interfaceMapDownlink<K,V>- Specified by:
willLinkin interfaceWarpDownlink- Specified by:
willLinkin classWarpDownlinkView
-
didLink
public MapDownlinkView<K,V> didLink(DidLink didLink)
- Specified by:
didLinkin interfaceMapDownlink<K,V>- Specified by:
didLinkin interfaceWarpDownlink- Specified by:
didLinkin classWarpDownlinkView
-
willSync
public MapDownlinkView<K,V> willSync(WillSync willSync)
- Specified by:
willSyncin interfaceMapDownlink<K,V>- Specified by:
willSyncin interfaceWarpDownlink- Specified by:
willSyncin classWarpDownlinkView
-
didSync
public MapDownlinkView<K,V> didSync(DidSync didSync)
- Specified by:
didSyncin interfaceMapDownlink<K,V>- Specified by:
didSyncin interfaceWarpDownlink- Specified by:
didSyncin classWarpDownlinkView
-
willUnlink
public MapDownlinkView<K,V> willUnlink(WillUnlink willUnlink)
- Specified by:
willUnlinkin interfaceMapDownlink<K,V>- Specified by:
willUnlinkin interfaceWarpDownlink- Specified by:
willUnlinkin classWarpDownlinkView
-
didUnlink
public MapDownlinkView<K,V> didUnlink(DidUnlink didUnlink)
- Specified by:
didUnlinkin interfaceMapDownlink<K,V>- Specified by:
didUnlinkin interfaceWarpDownlink- Specified by:
didUnlinkin classWarpDownlinkView
-
didConnect
public MapDownlinkView<K,V> didConnect(DidConnect didConnect)
- Specified by:
didConnectin interfaceDownlink- Specified by:
didConnectin interfaceMapDownlink<K,V>- Specified by:
didConnectin interfaceWarpDownlink- Specified by:
didConnectin classWarpDownlinkView
-
didDisconnect
public MapDownlinkView<K,V> didDisconnect(DidDisconnect didDisconnect)
- Specified by:
didDisconnectin interfaceDownlink- Specified by:
didDisconnectin interfaceMapDownlink<K,V>- Specified by:
didDisconnectin interfaceWarpDownlink- Specified by:
didDisconnectin classWarpDownlinkView
-
didClose
public MapDownlinkView<K,V> didClose(DidClose didClose)
- Specified by:
didClosein interfaceDownlink- Specified by:
didClosein interfaceMapDownlink<K,V>- Specified by:
didClosein interfaceWarpDownlink- Specified by:
didClosein classWarpDownlinkView
-
didFail
public MapDownlinkView<K,V> didFail(DidFail didFail)
- Specified by:
didFailin interfaceDownlink- Specified by:
didFailin interfaceMapDownlink<K,V>- Specified by:
didFailin interfaceWarpDownlink- Specified by:
didFailin classWarpDownlinkView
-
downlinkDidUpdateValue
public void downlinkDidUpdateValue(Value key, Value newValue, Value oldValue)
-
downlinkWillRemoveValue
public void downlinkWillRemoveValue(Value key)
-
downlinkWillRemove
public void downlinkWillRemove(K key)
-
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()
-
dispatchWillUpdate
public Map.Entry<Boolean,V> dispatchWillUpdate(K key, V newValue, boolean preemptive)
-
dispatchDidUpdate
public boolean dispatchDidUpdate(K key, V newValue, V oldValue, boolean preemptive)
-
dispatchWillRemove
public boolean dispatchWillRemove(K key, 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)
-
createDownlinkModel
public MapDownlinkModel createDownlinkModel()
- Specified by:
createDownlinkModelin classWarpDownlinkView
-
open
public MapDownlinkView<K,V> open()
- Specified by:
openin interfaceDownlink- Specified by:
openin interfaceMapDownlink<K,V>- Specified by:
openin interfaceWarpDownlink- Specified by:
openin classWarpDownlinkView
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object keyObject)
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,MapDownlink<K,V>>- Specified by:
containsKeyin interfaceOrderedMap<K,V>
-
containsValue
public boolean containsValue(Object valueObject)
- Specified by:
containsValuein interfaceIterableMap<K,V>- Specified by:
containsValuein interfaceMap<K,V>- Specified by:
containsValuein interfaceOrderedMap<K,V>
-
indexOf
public int indexOf(Object keyObject)
- Specified by:
indexOfin interfaceOrderedMap<K,V>
-
get
public V get(Object keyObject)
Description copied from interface:MapOutletReturns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.
-
getEntry
public Map.Entry<K,V> getEntry(Object keyObject)
- Specified by:
getEntryin interfaceOrderedMap<K,V>
-
getIndex
public Map.Entry<K,V> getIndex(int index)
- Specified by:
getIndexin interfaceOrderedMap<K,V>
-
firstEntry
public Map.Entry<K,V> firstEntry()
- Specified by:
firstEntryin interfaceOrderedMap<K,V>
-
firstKey
public K firstKey()
-
firstValue
public V firstValue()
- Specified by:
firstValuein interfaceOrderedMap<K,V>
-
lastKey
public K lastKey()
-
lastValue
public V lastValue()
- Specified by:
lastValuein interfaceOrderedMap<K,V>
-
nextEntry
public Map.Entry<K,V> nextEntry(Object keyObject)
- Specified by:
nextEntryin interfaceOrderedMap<K,V>
-
nextValue
public V nextValue(Object keyObject)
- Specified by:
nextValuein interfaceOrderedMap<K,V>
-
previousEntry
public Map.Entry<K,V> previousEntry(Object keyObject)
- Specified by:
previousEntryin interfaceOrderedMap<K,V>
-
previousKey
public K previousKey(Object keyObject)
- Specified by:
previousKeyin interfaceOrderedMap<K,V>
-
previousValue
public V previousValue(Object keyObject)
- Specified by:
previousValuein interfaceOrderedMap<K,V>
-
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
public OrderedMap<K,V> headMap(K toKeyObject)
-
tailMap
public OrderedMap<K,V> tailMap(K fromKeyObject)
-
subMap
public OrderedMap<K,V> subMap(K fromKeyObject, K toKeyObject)
-
values
public Collection<V> values()
-
iterator
public OrderedMapCursor<K,V> iterator()
-
keyIterator
public Cursor<K> keyIterator()
Description copied from interface:MapOutletReturns anIteratorover the keys in the current state of thisMapOutlet.- Specified by:
keyIteratorin interfaceIterableMap<K,V>- Specified by:
keyIteratorin interfaceMapDownlink<K,V>- Specified by:
keyIteratorin interfaceMapOutlet<K,V,MapDownlink<K,V>>- Specified by:
keyIteratorin interfaceOrderedMap<K,V>
-
valueIterator
public Cursor<V> valueIterator()
- Specified by:
valueIteratorin interfaceIterableMap<K,V>- Specified by:
valueIteratorin interfaceOrderedMap<K,V>
-
comparator
public Comparator<? super K> comparator()
- Specified by:
comparatorin interfaceOrderedMap<K,V>- Specified by:
comparatorin interfaceSortedMap<K,V>
-
get
public MapDownlink<K,V> get()
Description copied from interface:OutletReturns the current state of thisOutlet.
-
input
public MapOutlet<K,V,? extends Map<K,V>> input()
Description copied from interface:InletReturns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.
-
bindInput
public void bindInput(Outlet<? extends Map<K,V>> input)
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.
-
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
public Outlet<V> outlet(K key)
Description copied from interface:MapOutletReturns anOutletthat updates when the specifiedkeyupdates.
-
outputIterator
public Iterator<Inlet<? super MapDownlink<K,V>>> outputIterator()
Description copied from interface:OutletReturns anIteratorover the set ofInlets that depend on the state of thisOutlet.- Specified by:
outputIteratorin interfaceOutlet<K>
-
bindOutput
public void bindOutput(Inlet<? super MapDownlink<K,V>> output)
Description copied from interface:OutletAdds anoutputto the set ofInlets that depend on the state of thisOutlet. Theoutputwill be invalidated when the state of thisOutletis invalidated, and updated when thisOutletis updated.- Specified by:
bindOutputin interfaceOutlet<K>
-
unbindOutput
public void unbindOutput(Inlet<? super MapDownlink<K,V>> output)
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>
-
invalidateOutputKey
public void invalidateOutputKey(K key, KeyEffect effect)
Description copied from interface:MapInletMarks thisMapInletas needing aneffectapplied 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:MapOutletMarks thisMapOutletas needing aneffectapplied 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.- Specified by:
invalidateInputKeyin interfaceMapOutlet<K,V,MapDownlink<K,V>>
-
invalidateOutput
public void invalidateOutput()
Description copied from interface:InletMarks thisInlet—and theStreamletto which thisInletis attached—as having stale state. Invalidating anInletwill recursively invalidate all streamlets that transitively depend on the state of thisInlet. Invalidating anInletdoes not cause its state to be recomputed. A subsequentInlet.reconcileOutput(int)call will reconcile the state of theInlet.- Specified by:
invalidateOutputin interfaceInlet<K>
-
invalidateInput
public void invalidateInput()
Description copied from interface:Outlet- Specified by:
invalidateInputin interfaceOutlet<K>
-
invalidate
public void invalidate()
-
reconcileOutputKey
public void reconcileOutputKey(K key, int version)
Description copied from interface:MapInletReconciles the state of an individualkeyin thisMapInlet, if the version of thisMapInlet's state differs from the targetversion. To reconcile the state of a key, theMapInletfirst 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, theMapInletinvokesStreamlet.reconcile(int)on its attached streamlet.
-
reconcileInputKey
public void reconcileInputKey(K key, int version)
Description copied from interface:MapOutletReconciles the state of an individualkeyin thisMapOutlet, if the version of thisMapOutlet's state differs from the targetversion. To reconcile the state of a key, theMapOutletfirst 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.- Specified by:
reconcileInputKeyin interfaceMapOutlet<K,V,MapDownlink<K,V>>
-
reconcileKey
public void reconcileKey(K key, int version)
-
reconcileOutput
public void reconcileOutput(int version)
Description copied from interface:InletReconciles the state of thisInlet, if the version of thisInlet's state differs from the targetversion. To reconcile its state, theInletfirst invokesOutlet.reconcileInput(int)on itsinput, to ensure that its input is up-to-date. It then invokesStreamlet.reconcile(int)on theStreamletto which it's attached, causing theStreamletto reconcile its own state.- Specified by:
reconcileOutputin interfaceInlet<K>
-
reconcileInput
public void reconcileInput(int version)
Description copied from interface:OutletReconciles the state of thisOutlet, if the version of thisOutlet's state differs from the targetversion. To reconcile its state, theOutletfirst invokesStreamlet.reconcile(int)on theStreamletto which it's attached. It then invokesInlet.reconcileOutput(int)on each of its dependentoutputs.- Specified by:
reconcileInputin 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)
-
-