- 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>
effects
protected MapOutlet<K,V,? extends Map<K,V>>
input
protected Form<K>
keyForm
protected MapDownlinkModel
model
protected HashTrieMap<K,KeyOutlet<K,V>>
outlets
protected Inlet<? super MapDownlink<K,V>>[]
outputs
protected static int
STATEFUL
protected Form<V>
valueForm
protected int
version
-
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 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 MapDownlink<K,V>> output)
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
.MapDownlinkView<K,V>
body(Value body)
void
clear()
Comparator<? super K>
comparator()
boolean
containsKey(Object keyObject)
Returnstrue
if the current state of thisMapOutlet
contains the givenkey
; otherwise returnsfalse
.boolean
containsValue(Object valueObject)
MapDownlinkModel
createDownlinkModel()
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 void
didInvalidate()
protected void
didInvalidateKey(K key, KeyEffect effect)
MapDownlinkView<K,V>
didLink(DidLink didLink)
MapDownlinkView<K,V>
didReceive(DidReceive didReceive)
protected void
didReconcile(int version)
protected void
didReconcileKey(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 void
didUpdate(int version)
MapDownlinkView<K,V>
didUpdate(DidUpdateKey<K,V> didUpdate)
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(boolean preemptive)
boolean
dispatchDidDrop(int lower, boolean preemptive)
boolean
dispatchDidRemove(K key, V oldValue, boolean preemptive)
boolean
dispatchDidTake(int upper, boolean preemptive)
boolean
dispatchDidUpdate(K key, V newValue, V oldValue, boolean preemptive)
boolean
dispatchWillClear(boolean preemptive)
boolean
dispatchWillDrop(int lower, boolean preemptive)
boolean
dispatchWillRemove(K key, boolean preemptive)
boolean
dispatchWillTake(int upper, boolean preemptive)
Map.Entry<Boolean,V>
dispatchWillUpdate(K key, V newValue, boolean preemptive)
void
downlinkDidClear()
void
downlinkDidDrop(int lower)
void
downlinkDidRemove(K key, V oldValue)
void
downlinkDidRemoveValue(Value key, Value oldValue)
void
downlinkDidTake(int upper)
void
downlinkDidUpdate(K key, V newValue, V oldValue)
void
downlinkDidUpdateValue(Value key, Value newValue, Value oldValue)
MapDownlinkModel
downlinkModel()
void
downlinkWillClear()
void
downlinkWillDrop(int lower)
void
downlinkWillRemove(K key)
void
downlinkWillRemoveValue(Value key)
void
downlinkWillTake(int upper)
V
downlinkWillUpdate(K key, V newValue)
Value
downlinkWillUpdateValue(Value key, Value newValue)
void
drop(int lower)
Set<Map.Entry<K,V>>
entrySet()
Map.Entry<K,V>
firstEntry()
K
firstKey()
V
firstValue()
MapDownlink<K,V>
get()
Returns the current state of thisOutlet
.V
get(Object keyObject)
Returns the value assocaited with the givenkey
in 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)
int
indexOf(Object keyObject)
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
isStateful()
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 anIterator
over 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()
K
lastKey()
V
lastValue()
Map.Entry<K,V>
nextEntry(Object keyObject)
K
nextKey(Object keyObject)
V
nextValue(Object keyObject)
MapDownlinkView<K,V>
nodeUri(String nodeUri)
MapDownlinkView<K,V>
nodeUri(Uri nodeUri)
MapDownlinkView<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)
MapDownlinkView<K,V>
open()
Outlet<V>
outlet(K key)
Returns anOutlet
that updates when the specifiedkey
updates.Iterator<Inlet<? super MapDownlink<K,V>>>
outputIterator()
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.Map.Entry<K,V>
previousEntry(Object keyObject)
K
previousKey(Object keyObject)
V
previousValue(Object keyObject)
MapDownlinkView<K,V>
prio(float prio)
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> map)
MapDownlinkView<K,V>
rate(float rate)
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)
int
size()
OrderedMap<K,V>
subMap(K fromKeyObject, K toKeyObject)
OrderedMap<K,V>
tailMap(K fromKeyObject)
void
take(int upper)
protected Object
typesafeObservers(Object observers)
void
unbindInput()
Disconnects thisInlet
from its inputOutlet
, if connected.void
unbindOutput(Inlet<? super MapDownlink<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
.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 void
willInvalidate()
protected void
willInvalidateKey(K key, KeyEffect effect)
MapDownlinkView<K,V>
willLink(WillLink willLink)
MapDownlinkView<K,V>
willReceive(WillReceive willReceive)
protected void
willReconcile(int version)
protected void
willReconcileKey(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 void
willUpdate(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:
downlinkModel
in classWarpDownlinkView
-
hostUri
public MapDownlinkView<K,V> hostUri(Uri hostUri)
- Specified by:
hostUri
in interfaceMapDownlink<K,V>
- Specified by:
hostUri
in interfaceWarpDownlink
- Specified by:
hostUri
in classWarpDownlinkView
-
hostUri
public MapDownlinkView<K,V> hostUri(String hostUri)
- Specified by:
hostUri
in interfaceMapDownlink<K,V>
- Specified by:
hostUri
in interfaceWarpDownlink
- Specified by:
hostUri
in classWarpDownlinkView
-
nodeUri
public MapDownlinkView<K,V> nodeUri(Uri nodeUri)
- Specified by:
nodeUri
in interfaceMapDownlink<K,V>
- Specified by:
nodeUri
in interfaceWarpDownlink
- Specified by:
nodeUri
in classWarpDownlinkView
-
nodeUri
public MapDownlinkView<K,V> nodeUri(String nodeUri)
- Specified by:
nodeUri
in interfaceMapDownlink<K,V>
- Specified by:
nodeUri
in interfaceWarpDownlink
- Specified by:
nodeUri
in classWarpDownlinkView
-
laneUri
public MapDownlinkView<K,V> laneUri(Uri laneUri)
- Specified by:
laneUri
in interfaceMapDownlink<K,V>
- Specified by:
laneUri
in interfaceWarpDownlink
- Specified by:
laneUri
in classWarpDownlinkView
-
laneUri
public MapDownlinkView<K,V> laneUri(String laneUri)
- Specified by:
laneUri
in interfaceMapDownlink<K,V>
- Specified by:
laneUri
in interfaceWarpDownlink
- Specified by:
laneUri
in classWarpDownlinkView
-
prio
public MapDownlinkView<K,V> prio(float prio)
- Specified by:
prio
in interfaceMapDownlink<K,V>
- Specified by:
prio
in interfaceWarpDownlink
- Specified by:
prio
in classWarpDownlinkView
-
rate
public MapDownlinkView<K,V> rate(float rate)
- Specified by:
rate
in interfaceMapDownlink<K,V>
- Specified by:
rate
in interfaceWarpDownlink
- Specified by:
rate
in classWarpDownlinkView
-
body
public MapDownlinkView<K,V> body(Value body)
- Specified by:
body
in interfaceMapDownlink<K,V>
- Specified by:
body
in interfaceWarpDownlink
- Specified by:
body
in classWarpDownlinkView
-
keepLinked
public MapDownlinkView<K,V> keepLinked(boolean keepLinked)
- Specified by:
keepLinked
in interfaceMapDownlink<K,V>
- Specified by:
keepLinked
in interfaceWarpDownlink
- Specified by:
keepLinked
in classWarpDownlinkView
-
keepSynced
public MapDownlinkView<K,V> keepSynced(boolean keepSynced)
- Specified by:
keepSynced
in interfaceMapDownlink<K,V>
- Specified by:
keepSynced
in interfaceWarpDownlink
- Specified by:
keepSynced
in classWarpDownlinkView
-
isStateful
public final boolean isStateful()
- Specified by:
isStateful
in interfaceMapDownlink<K,V>
-
isStateful
public MapDownlinkView<K,V> isStateful(boolean isStateful)
- Specified by:
isStateful
in interfaceMapDownlink<K,V>
-
keyForm
public <K2> MapDownlinkView<K2,V> keyForm(Form<K2> keyForm)
- Specified by:
keyForm
in interfaceMapDownlink<K,V>
-
keyClass
public <K2> MapDownlinkView<K2,V> keyClass(Class<K2> keyClass)
- Specified by:
keyClass
in interfaceMapDownlink<K,V>
-
valueForm
public <V2> MapDownlinkView<K,V2> valueForm(Form<V2> valueForm)
- Specified by:
valueForm
in interfaceMapDownlink<K,V>
-
valueClass
public <V2> MapDownlinkView<K,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceMapDownlink<K,V>
-
observe
public MapDownlinkView<K,V> observe(Object observer)
- Specified by:
observe
in interfaceDownlink
- Specified by:
observe
in interfaceLink
- Specified by:
observe
in interfaceMapDownlink<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 interfaceWarpDownlink
- Overrides:
observe
in classWarpDownlinkView
-
unobserve
public MapDownlinkView<K,V> unobserve(Object observer)
- Specified by:
unobserve
in interfaceDownlink
- Specified by:
unobserve
in interfaceLink
- Specified by:
unobserve
in interfaceMapDownlink<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 interfaceWarpDownlink
- Overrides:
unobserve
in classWarpDownlinkView
-
willUpdate
public MapDownlinkView<K,V> willUpdate(WillUpdateKey<K,V> willUpdate)
- Specified by:
willUpdate
in interfaceMapDownlink<K,V>
- Specified by:
willUpdate
in interfaceObservableMap<K,V>
-
didUpdate
public MapDownlinkView<K,V> didUpdate(DidUpdateKey<K,V> didUpdate)
- Specified by:
didUpdate
in interfaceMapDownlink<K,V>
- Specified by:
didUpdate
in interfaceObservableMap<K,V>
-
willRemove
public MapDownlinkView<K,V> willRemove(WillRemoveKey<K> willRemove)
- Specified by:
willRemove
in interfaceMapDownlink<K,V>
- Specified by:
willRemove
in interfaceObservableMap<K,V>
-
didRemove
public MapDownlinkView<K,V> didRemove(DidRemoveKey<K,V> didRemove)
- Specified by:
didRemove
in interfaceMapDownlink<K,V>
- Specified by:
didRemove
in interfaceObservableMap<K,V>
-
willDrop
public MapDownlink<K,V> willDrop(WillDrop willDrop)
- Specified by:
willDrop
in interfaceMapDownlink<K,V>
- Specified by:
willDrop
in interfaceObservableSortedMap<K,V>
-
didDrop
public MapDownlink<K,V> didDrop(DidDrop didDrop)
- Specified by:
didDrop
in interfaceMapDownlink<K,V>
- Specified by:
didDrop
in interfaceObservableSortedMap<K,V>
-
willTake
public MapDownlink<K,V> willTake(WillTake willTake)
- Specified by:
willTake
in interfaceMapDownlink<K,V>
- Specified by:
willTake
in interfaceObservableSortedMap<K,V>
-
didTake
public MapDownlink<K,V> didTake(DidTake didTake)
- Specified by:
didTake
in interfaceMapDownlink<K,V>
- Specified by:
didTake
in interfaceObservableSortedMap<K,V>
-
willClear
public MapDownlinkView<K,V> willClear(WillClear willClear)
- Specified by:
willClear
in interfaceMapDownlink<K,V>
- Specified by:
willClear
in interfaceObservableMap<K,V>
-
didClear
public MapDownlinkView<K,V> didClear(DidClear didClear)
- Specified by:
didClear
in interfaceMapDownlink<K,V>
- Specified by:
didClear
in interfaceObservableMap<K,V>
-
willReceive
public MapDownlinkView<K,V> willReceive(WillReceive willReceive)
- Specified by:
willReceive
in interfaceMapDownlink<K,V>
- Specified by:
willReceive
in interfaceWarpDownlink
- Specified by:
willReceive
in classWarpDownlinkView
-
didReceive
public MapDownlinkView<K,V> didReceive(DidReceive didReceive)
- Specified by:
didReceive
in interfaceMapDownlink<K,V>
- Specified by:
didReceive
in interfaceWarpDownlink
- Specified by:
didReceive
in classWarpDownlinkView
-
willCommand
public MapDownlinkView<K,V> willCommand(WillCommand willCommand)
- Specified by:
willCommand
in interfaceMapDownlink<K,V>
- Specified by:
willCommand
in interfaceWarpDownlink
- Specified by:
willCommand
in classWarpDownlinkView
-
willLink
public MapDownlinkView<K,V> willLink(WillLink willLink)
- Specified by:
willLink
in interfaceMapDownlink<K,V>
- Specified by:
willLink
in interfaceWarpDownlink
- Specified by:
willLink
in classWarpDownlinkView
-
didLink
public MapDownlinkView<K,V> didLink(DidLink didLink)
- Specified by:
didLink
in interfaceMapDownlink<K,V>
- Specified by:
didLink
in interfaceWarpDownlink
- Specified by:
didLink
in classWarpDownlinkView
-
willSync
public MapDownlinkView<K,V> willSync(WillSync willSync)
- Specified by:
willSync
in interfaceMapDownlink<K,V>
- Specified by:
willSync
in interfaceWarpDownlink
- Specified by:
willSync
in classWarpDownlinkView
-
didSync
public MapDownlinkView<K,V> didSync(DidSync didSync)
- Specified by:
didSync
in interfaceMapDownlink<K,V>
- Specified by:
didSync
in interfaceWarpDownlink
- Specified by:
didSync
in classWarpDownlinkView
-
willUnlink
public MapDownlinkView<K,V> willUnlink(WillUnlink willUnlink)
- Specified by:
willUnlink
in interfaceMapDownlink<K,V>
- Specified by:
willUnlink
in interfaceWarpDownlink
- Specified by:
willUnlink
in classWarpDownlinkView
-
didUnlink
public MapDownlinkView<K,V> didUnlink(DidUnlink didUnlink)
- Specified by:
didUnlink
in interfaceMapDownlink<K,V>
- Specified by:
didUnlink
in interfaceWarpDownlink
- Specified by:
didUnlink
in classWarpDownlinkView
-
didConnect
public MapDownlinkView<K,V> didConnect(DidConnect didConnect)
- Specified by:
didConnect
in interfaceDownlink
- Specified by:
didConnect
in interfaceMapDownlink<K,V>
- Specified by:
didConnect
in interfaceWarpDownlink
- Specified by:
didConnect
in classWarpDownlinkView
-
didDisconnect
public MapDownlinkView<K,V> didDisconnect(DidDisconnect didDisconnect)
- Specified by:
didDisconnect
in interfaceDownlink
- Specified by:
didDisconnect
in interfaceMapDownlink<K,V>
- Specified by:
didDisconnect
in interfaceWarpDownlink
- Specified by:
didDisconnect
in classWarpDownlinkView
-
didClose
public MapDownlinkView<K,V> didClose(DidClose didClose)
- Specified by:
didClose
in interfaceDownlink
- Specified by:
didClose
in interfaceMapDownlink<K,V>
- Specified by:
didClose
in interfaceWarpDownlink
- Specified by:
didClose
in classWarpDownlinkView
-
didFail
public MapDownlinkView<K,V> didFail(DidFail didFail)
- Specified by:
didFail
in interfaceDownlink
- Specified by:
didFail
in interfaceMapDownlink<K,V>
- Specified by:
didFail
in interfaceWarpDownlink
- Specified by:
didFail
in 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:
createDownlinkModel
in classWarpDownlinkView
-
open
public MapDownlinkView<K,V> open()
- Specified by:
open
in interfaceDownlink
- Specified by:
open
in interfaceMapDownlink<K,V>
- Specified by:
open
in interfaceWarpDownlink
- Specified by:
open
in classWarpDownlinkView
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
containsKey
public boolean containsKey(Object keyObject)
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,MapDownlink<K,V>>
- Specified by:
containsKey
in interfaceOrderedMap<K,V>
-
containsValue
public boolean containsValue(Object valueObject)
- 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 keyObject)
- Specified by:
indexOf
in interfaceOrderedMap<K,V>
-
get
public V get(Object keyObject)
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 keyObject)
- 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(Object keyObject)
- Specified by:
nextEntry
in interfaceOrderedMap<K,V>
-
nextValue
public V nextValue(Object keyObject)
- Specified by:
nextValue
in interfaceOrderedMap<K,V>
-
previousEntry
public Map.Entry<K,V> previousEntry(Object keyObject)
- Specified by:
previousEntry
in interfaceOrderedMap<K,V>
-
previousKey
public K previousKey(Object keyObject)
- Specified by:
previousKey
in interfaceOrderedMap<K,V>
-
previousValue
public V previousValue(Object keyObject)
- 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 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:MapOutlet
Returns anIterator
over the keys in the current state of thisMapOutlet
.- Specified by:
keyIterator
in interfaceIterableMap<K,V>
- Specified by:
keyIterator
in interfaceMapDownlink<K,V>
- Specified by:
keyIterator
in interfaceMapOutlet<K,V,MapDownlink<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 MapDownlink<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 MapDownlink<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 MapDownlink<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 MapDownlink<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
.- Specified by:
invalidateInputKey
in interfaceMapOutlet<K,V,MapDownlink<K,V>>
-
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
.- Specified by:
reconcileInputKey
in interfaceMapOutlet<K,V,MapDownlink<K,V>>
-
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)
-
-