- 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>,swim.api.downlink.DownlinkFactory,swim.api.Lane,swim.api.lane.MapLane<K,V>,swim.api.ref.SwimRef,swim.api.warp.WarpLane,swim.observable.Observable<Object>,swim.observable.ObservableIterableMap<K,V>,swim.observable.ObservableMap<K,V>,swim.observable.ObservableOrderedMap<K,V>,swim.observable.ObservableSortedMap<K,V>,CellContext,TierBinding,swim.streamlet.Inlet<Map<K,V>>,swim.streamlet.MapInlet<K,V,Map<K,V>>,swim.streamlet.MapOutlet<K,V,swim.api.lane.MapLane<K,V>>,swim.streamlet.Outlet<swim.api.lane.MapLane<K,V>>,swim.util.IterableMap<K,V>,swim.util.Log,swim.util.OrderedMap<K,V>
public class MapLaneView<K,V> extends WarpLaneView implements swim.api.lane.MapLane<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.api.agent.AgentContextagentContextprotected swim.api.data.MapData<K,V>dataViewprotected swim.collections.HashTrieMap<K,swim.streamlet.KeyEffect>effectsprotected intflagsprotected swim.streamlet.MapOutlet<K,V,? extends Map<K,V>>inputprotected swim.structure.Form<K>keyFormprotected MapLaneModellaneBindingprotected swim.collections.HashTrieMap<K,swim.streamlet.KeyOutlet<K,V>>outletsprotected swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>>[]outputsprotected swim.structure.Form<V>valueFormprotected intversion-
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(swim.api.agent.AgentContext agentContext, swim.structure.Form<K> keyForm, swim.structure.Form<V> valueForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description swim.api.agent.AgentContextagentContext()voidbindInput(swim.streamlet.MapOutlet<K,V,? extends Map<K,V>> input)voidbindInput(swim.streamlet.Outlet<? extends Map<K,V>> input)voidbindOutput(swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>> output)voidclear()voidclose()Comparator<? super K>comparator()booleancontainsKey(Object key)booleancontainsValue(Object value)MapLaneModelcreateLaneBinding()voiddecohere()voiddecohereInput()voiddecohereInputKey(K key, swim.streamlet.KeyEffect effect)voiddecohereKey(K key, swim.streamlet.KeyEffect effect)voiddecohereOutput()voiddecohereOutputKey(K key, swim.streamlet.KeyEffect effect)MapLaneView<K,V>didClear(swim.observable.function.DidClear didClear)MapLaneView<K,V>didCommand(swim.api.warp.function.DidCommand didCommand)protected voiddidDecohere()protected voiddidDecohereKey(K key, swim.streamlet.KeyEffect effect)MapLaneView<K,V>didDrop(swim.observable.function.DidDrop didDrop)MapLaneView<K,V>didEnter(swim.api.warp.function.DidEnter didEnter)MapLaneView<K,V>didLeave(swim.api.warp.function.DidLeave didLeave)protected voiddidRecohere(int version)protected voiddidRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)MapLaneView<K,V>didRemove(swim.observable.function.DidRemoveKey<K,V> didRemove)MapLaneView<K,V>didTake(swim.observable.function.DidTake didTake)MapLaneView<K,V>didUpdate(swim.observable.function.DidUpdateKey<K,V> didUpdate)MapLaneView<K,V>didUplink(swim.api.warp.function.DidUplink didUplink)voiddisconnectInputs()voiddisconnectOutputs()booleandispatchDidClear(swim.api.Link link, boolean preemptive)booleandispatchDidDrop(swim.api.Link link, int lower, boolean preemptive)booleandispatchDidRemove(swim.api.Link link, K key, V oldValue, boolean preemptive)booleandispatchDidTake(swim.api.Link link, int upper, boolean preemptive)booleandispatchDidUpdate(swim.api.Link link, K key, V newValue, V oldValue, boolean preemptive)booleandispatchWillClear(swim.api.Link link, boolean preemptive)booleandispatchWillDrop(swim.api.Link link, int lower, boolean preemptive)booleandispatchWillRemove(swim.api.Link link, K key, boolean preemptive)booleandispatchWillTake(swim.api.Link link, int upper, boolean preemptive)Map.Entry<Boolean,V>dispatchWillUpdate(swim.api.Link link, K key, V newValue, boolean preemptive)voiddrop(int lower)Set<Map.Entry<K,V>>entrySet()Map.Entry<K,V>firstEntry()KfirstKey()VfirstValue()swim.api.lane.MapLane<K,V>get()Vget(Object key)Map.Entry<K,V>getEntry(Object key)Map.Entry<K,V>getIndex(int index)swim.util.OrderedMap<K,V>headMap(K toKey)intindexOf(Object key)swim.streamlet.MapOutlet<K,V,? extends Map<K,V>>input()booleanisEmpty()booleanisResident()MapLaneView<K,V>isResident(boolean isResident)booleanisTransient()MapLaneView<K,V>isTransient(boolean isTransient)swim.util.OrderedMapCursor<K,V>iterator()<K2> MapLaneView<K2,V>keyClass(Class<K2> keyClass)swim.structure.Form<K>keyForm()<K2> MapLaneView<K2,V>keyForm(swim.structure.Form<K2> keyForm)swim.util.Cursor<K>keyIterator()Set<K>keySet()MapLaneModellaneBinding()voidlaneDidClear()voidlaneDidDrop(int lower)voidlaneDidRemove(K key, V oldValue)voidlaneDidTake(int upper)voidlaneDidUpdate(K key, V newValue, V oldValue)voidlaneWillClear()voidlaneWillDrop(int lower)voidlaneWillRemove(K key)voidlaneWillTake(int upper)VlaneWillUpdate(K key, V newValue)Map.Entry<K,V>lastEntry()KlastKey()VlastValue()Map.Entry<K,V>nextEntry(K key)KnextKey(K key)VnextValue(K key)MapLaneView<K,V>observe(Object observer)protected voidonDecohere()protected voidonDecohereKey(K key, swim.streamlet.KeyEffect effect)protected voidonRecohere(int version)protected voidonRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)swim.streamlet.Outlet<V>outlet(K key)Iterator<swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>>>outputIterator()Map.Entry<K,V>previousEntry(K key)KpreviousKey(K key)VpreviousValue(K key)Vput(K key, V value)voidputAll(Map<? extends K,? extends V> map)voidrecohere(int version)voidrecohereInput(int version)voidrecohereInputKey(K key, int version)voidrecohereKey(K key, int version)voidrecohereOutput(int version)voidrecohereOutputKey(K key, int version)Vremove(Object key)voidsetKeyForm(swim.structure.Form<K> keyForm)voidsetValueForm(swim.structure.Form<V> valueForm)intsize()swim.util.OrderedMap<K,V>snapshot()swim.util.OrderedMap<K,V>subMap(K fromKey, K toKey)swim.util.OrderedMap<K,V>tailMap(K fromKey)voidtake(int upper)protected ObjecttypesafeObservers(Object observers)voidunbindInput()voidunbindOutput(swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>> output)voidunbindOutputs()MapLaneView<K,V>unobserve(Object observer)<V2> MapLaneView<K,V2>valueClass(Class<V2> valueClass)swim.structure.Form<V>valueForm()<V2> MapLaneView<K,V2>valueForm(swim.structure.Form<V2> valueForm)swim.util.Cursor<V>valueIterator()Collection<V>values()MapLaneView<K,V>willClear(swim.observable.function.WillClear willClear)MapLaneView<K,V>willCommand(swim.api.warp.function.WillCommand willCommand)protected voidwillDecohere()protected voidwillDecohereKey(K key, swim.streamlet.KeyEffect effect)MapLaneView<K,V>willDrop(swim.observable.function.WillDrop willDrop)MapLaneView<K,V>willEnter(swim.api.warp.function.WillEnter willEnter)MapLaneView<K,V>willLeave(swim.api.warp.function.WillLeave willLeave)protected voidwillLoad()protected voidwillRecohere(int version)protected voidwillRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)MapLaneView<K,V>willRemove(swim.observable.function.WillRemoveKey<K> willRemove)MapLaneView<K,V>willTake(swim.observable.function.WillTake willTake)MapLaneView<K,V>willUpdate(swim.observable.function.WillUpdateKey<K,V> willUpdate)MapLaneView<K,V>willUplink(swim.api.warp.function.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, 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, 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 swim.api.agent.AgentContext agentContext
-
keyForm
protected swim.structure.Form<K> keyForm
-
valueForm
protected swim.structure.Form<V> valueForm
-
flags
protected int flags
-
laneBinding
protected MapLaneModel laneBinding
-
effects
protected swim.collections.HashTrieMap<K,swim.streamlet.KeyEffect> effects
-
version
protected int version
-
-
Method Detail
-
agentContext
public swim.api.agent.AgentContext agentContext()
- Specified by:
agentContextin classLaneView
-
laneBinding
public MapLaneModel laneBinding()
- Specified by:
laneBindingin classLaneView
-
createLaneBinding
public MapLaneModel createLaneBinding()
- Specified by:
createLaneBindingin classLaneView
-
keyForm
public final swim.structure.Form<K> keyForm()
-
keyForm
public <K2> MapLaneView<K2,V> keyForm(swim.structure.Form<K2> keyForm)
-
keyClass
public <K2> MapLaneView<K2,V> keyClass(Class<K2> keyClass)
-
setKeyForm
public void setKeyForm(swim.structure.Form<K> keyForm)
-
valueForm
public final swim.structure.Form<V> valueForm()
-
valueForm
public <V2> MapLaneView<K,V2> valueForm(swim.structure.Form<V2> valueForm)
-
valueClass
public <V2> MapLaneView<K,V2> valueClass(Class<V2> valueClass)
-
setValueForm
public void setValueForm(swim.structure.Form<V> valueForm)
-
isResident
public final boolean isResident()
-
isResident
public MapLaneView<K,V> isResident(boolean isResident)
-
isTransient
public final boolean isTransient()
-
isTransient
public MapLaneView<K,V> isTransient(boolean isTransient)
-
willLoad
protected void willLoad()
- Overrides:
willLoadin classAbstractTierBinding
-
close
public void close()
- Specified by:
closein interfaceswim.api.Lane- Specified by:
closein interfaceswim.api.ref.SwimRef- Specified by:
closein interfaceTierBinding- Specified by:
closein classLaneView
-
observe
public MapLaneView<K,V> observe(Object observer)
- Specified by:
observein interfaceswim.api.Lane- Specified by:
observein interfaceswim.api.lane.MapLane<K,V>- Specified by:
observein interfaceswim.observable.Observable<K>- Specified by:
observein interfaceswim.observable.ObservableMap<K,V>- Specified by:
observein interfaceswim.observable.ObservableSortedMap<K,V>- Specified by:
observein interfaceswim.api.warp.WarpLane- Overrides:
observein classWarpLaneView
-
unobserve
public MapLaneView<K,V> unobserve(Object observer)
- Specified by:
unobservein interfaceswim.api.Lane- Specified by:
unobservein interfaceswim.api.lane.MapLane<K,V>- Specified by:
unobservein interfaceswim.observable.Observable<K>- Specified by:
unobservein interfaceswim.observable.ObservableMap<K,V>- Specified by:
unobservein interfaceswim.observable.ObservableSortedMap<K,V>- Specified by:
unobservein interfaceswim.api.warp.WarpLane- Overrides:
unobservein classWarpLaneView
-
willUpdate
public MapLaneView<K,V> willUpdate(swim.observable.function.WillUpdateKey<K,V> willUpdate)
-
didUpdate
public MapLaneView<K,V> didUpdate(swim.observable.function.DidUpdateKey<K,V> didUpdate)
-
willRemove
public MapLaneView<K,V> willRemove(swim.observable.function.WillRemoveKey<K> willRemove)
-
didRemove
public MapLaneView<K,V> didRemove(swim.observable.function.DidRemoveKey<K,V> didRemove)
-
willDrop
public MapLaneView<K,V> willDrop(swim.observable.function.WillDrop willDrop)
-
didDrop
public MapLaneView<K,V> didDrop(swim.observable.function.DidDrop didDrop)
-
willTake
public MapLaneView<K,V> willTake(swim.observable.function.WillTake willTake)
-
didTake
public MapLaneView<K,V> didTake(swim.observable.function.DidTake didTake)
-
willClear
public MapLaneView<K,V> willClear(swim.observable.function.WillClear willClear)
-
didClear
public MapLaneView<K,V> didClear(swim.observable.function.DidClear didClear)
-
willCommand
public MapLaneView<K,V> willCommand(swim.api.warp.function.WillCommand willCommand)
- Specified by:
willCommandin interfaceswim.api.lane.MapLane<K,V>- Specified by:
willCommandin interfaceswim.api.warp.WarpLane- Specified by:
willCommandin classWarpLaneView
-
didCommand
public MapLaneView<K,V> didCommand(swim.api.warp.function.DidCommand didCommand)
- Specified by:
didCommandin interfaceswim.api.lane.MapLane<K,V>- Specified by:
didCommandin interfaceswim.api.warp.WarpLane- Specified by:
didCommandin classWarpLaneView
-
willUplink
public MapLaneView<K,V> willUplink(swim.api.warp.function.WillUplink willUplink)
- Specified by:
willUplinkin interfaceswim.api.lane.MapLane<K,V>- Specified by:
willUplinkin interfaceswim.api.warp.WarpLane- Specified by:
willUplinkin classWarpLaneView
-
didUplink
public MapLaneView<K,V> didUplink(swim.api.warp.function.DidUplink didUplink)
- Specified by:
didUplinkin interfaceswim.api.lane.MapLane<K,V>- Specified by:
didUplinkin interfaceswim.api.warp.WarpLane- Specified by:
didUplinkin classWarpLaneView
-
willEnter
public MapLaneView<K,V> willEnter(swim.api.warp.function.WillEnter willEnter)
- Specified by:
willEnterin interfaceswim.api.lane.MapLane<K,V>- Specified by:
willEnterin interfaceswim.api.warp.WarpLane- Specified by:
willEnterin classWarpLaneView
-
didEnter
public MapLaneView<K,V> didEnter(swim.api.warp.function.DidEnter didEnter)
- Specified by:
didEnterin interfaceswim.api.lane.MapLane<K,V>- Specified by:
didEnterin interfaceswim.api.warp.WarpLane- Specified by:
didEnterin classWarpLaneView
-
willLeave
public MapLaneView<K,V> willLeave(swim.api.warp.function.WillLeave willLeave)
- Specified by:
willLeavein interfaceswim.api.lane.MapLane<K,V>- Specified by:
willLeavein interfaceswim.api.warp.WarpLane- Specified by:
willLeavein classWarpLaneView
-
didLeave
public MapLaneView<K,V> didLeave(swim.api.warp.function.DidLeave didLeave)
- Specified by:
didLeavein interfaceswim.api.lane.MapLane<K,V>- Specified by:
didLeavein interfaceswim.api.warp.WarpLane- Specified by:
didLeavein classWarpLaneView
-
dispatchWillUpdate
public Map.Entry<Boolean,V> dispatchWillUpdate(swim.api.Link link, K key, V newValue, boolean preemptive)
-
dispatchDidUpdate
public boolean dispatchDidUpdate(swim.api.Link link, K key, V newValue, V oldValue, boolean preemptive)
-
dispatchWillRemove
public boolean dispatchWillRemove(swim.api.Link link, K key, boolean preemptive)
-
dispatchDidRemove
public boolean dispatchDidRemove(swim.api.Link link, K key, V oldValue, boolean preemptive)
-
dispatchWillDrop
public boolean dispatchWillDrop(swim.api.Link link, int lower, boolean preemptive)
-
dispatchDidDrop
public boolean dispatchDidDrop(swim.api.Link link, int lower, boolean preemptive)
-
dispatchWillTake
public boolean dispatchWillTake(swim.api.Link link, int upper, boolean preemptive)
-
dispatchDidTake
public boolean dispatchDidTake(swim.api.Link link, int upper, boolean preemptive)
-
dispatchWillClear
public boolean dispatchWillClear(swim.api.Link link, boolean preemptive)
-
dispatchDidClear
public boolean dispatchDidClear(swim.api.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)
-
containsValue
public boolean containsValue(Object value)
-
indexOf
public int indexOf(Object key)
-
firstKey
public K firstKey()
-
lastKey
public K lastKey()
-
drop
public void drop(int lower)
-
take
public void take(int upper)
-
clear
public void clear()
-
values
public Collection<V> values()
-
keyIterator
public swim.util.Cursor<K> keyIterator()
-
valueIterator
public swim.util.Cursor<V> valueIterator()
-
comparator
public Comparator<? super K> comparator()
-
get
public swim.api.lane.MapLane<K,V> get()
- Specified by:
getin interfaceswim.streamlet.Outlet<K>
-
input
public swim.streamlet.MapOutlet<K,V,? extends Map<K,V>> input()
- Specified by:
inputin interfaceswim.streamlet.Inlet<K>
-
bindInput
public void bindInput(swim.streamlet.Outlet<? extends Map<K,V>> input)
- Specified by:
bindInputin interfaceswim.streamlet.Inlet<K>
-
unbindInput
public void unbindInput()
- Specified by:
unbindInputin interfaceswim.streamlet.Inlet<K>
-
disconnectInputs
public void disconnectInputs()
-
outputIterator
public Iterator<swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>>> outputIterator()
- Specified by:
outputIteratorin interfaceswim.streamlet.Outlet<K>
-
bindOutput
public void bindOutput(swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>> output)
- Specified by:
bindOutputin interfaceswim.streamlet.Outlet<K>
-
unbindOutput
public void unbindOutput(swim.streamlet.Inlet<? super swim.api.lane.MapLane<K,V>> output)
- Specified by:
unbindOutputin interfaceswim.streamlet.Outlet<K>
-
unbindOutputs
public void unbindOutputs()
- Specified by:
unbindOutputsin interfaceswim.streamlet.Outlet<K>
-
disconnectOutputs
public void disconnectOutputs()
-
decohereOutputKey
public void decohereOutputKey(K key, swim.streamlet.KeyEffect effect)
-
decohereInputKey
public void decohereInputKey(K key, swim.streamlet.KeyEffect effect)
-
decohereKey
public void decohereKey(K key, swim.streamlet.KeyEffect effect)
-
decohereOutput
public void decohereOutput()
- Specified by:
decohereOutputin interfaceswim.streamlet.Inlet<K>
-
decohereInput
public void decohereInput()
- Specified by:
decohereInputin interfaceswim.streamlet.Outlet<K>
-
decohere
public void decohere()
-
recohereOutputKey
public void recohereOutputKey(K key, int version)
-
recohereInputKey
public void recohereInputKey(K key, int version)
-
recohereKey
public void recohereKey(K key, int version)
-
recohereOutput
public void recohereOutput(int version)
- Specified by:
recohereOutputin interfaceswim.streamlet.Inlet<K>
-
recohereInput
public void recohereInput(int version)
- Specified by:
recohereInputin interfaceswim.streamlet.Outlet<K>
-
recohere
public void recohere(int version)
-
willDecohereKey
protected void willDecohereKey(K key, swim.streamlet.KeyEffect effect)
-
onDecohereKey
protected void onDecohereKey(K key, swim.streamlet.KeyEffect effect)
-
didDecohereKey
protected void didDecohereKey(K key, swim.streamlet.KeyEffect effect)
-
willDecohere
protected void willDecohere()
-
onDecohere
protected void onDecohere()
-
didDecohere
protected void didDecohere()
-
willRecohereKey
protected void willRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)
-
onRecohereKey
protected void onRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)
-
didRecohereKey
protected void didRecohereKey(K key, swim.streamlet.KeyEffect effect, int version)
-
willRecohere
protected void willRecohere(int version)
-
onRecohere
protected void onRecohere(int version)
-
didRecohere
protected void didRecohere(int version)
-
-