- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.LaneView
-
- swim.runtime.warp.WarpLaneView
-
- swim.runtime.lane.SpatialLaneView<K,S,V>
-
- All Implemented Interfaces:
Iterable<SpatialMap.Entry<K,S,V>>
,DownlinkFactory
,Lane
,SpatialLane<K,S,V>
,SwimRef
,WarpLane
,Observable<Object>
,ObservableSpatialMap<K,S,V>
,CellContext
,TierBinding
,SpatialMap<K,S,V>
,Log
public class SpatialLaneView<K,S,V> extends WarpLaneView implements SpatialLane<K,S,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface swim.spatial.SpatialMap
SpatialMap.Entry<K,S,V>, SpatialMap.SimpleEntry<K,S,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected AgentContext
agentContext
protected SpatialData<K,S,V>
dataView
protected int
flags
protected Form<K>
keyForm
protected SpatialLaneModel<S>
laneBinding
protected Z2Form<S>
shapeForm
protected Form<V>
valueForm
-
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 SpatialLaneView(AgentContext agentContext, Form<K> keyForm, Z2Form<S> shapeForm, Form<V> valueForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentContext
agentContext()
void
clear()
void
close()
boolean
containsKey(Object key)
boolean
containsKey(K key, S shape)
boolean
containsValue(Object value)
LaneBinding
createLaneBinding()
SpatialLane<K,S,V>
didClear(DidClear didClear)
SpatialLaneView<K,S,V>
didCommand(DidCommand didCommand)
SpatialLaneView<K,S,V>
didEnter(DidEnter didEnter)
SpatialLaneView<K,S,V>
didLeave(DidLeave didLeave)
SpatialLane<K,S,V>
didMove(DidMoveShape<K,S,V> didMove)
SpatialLane<K,S,V>
didRemove(DidRemoveShape<K,S,V> didRemove)
SpatialLane<K,S,V>
didUpdate(DidUpdateShape<K,S,V> didUpdate)
SpatialLaneView<K,S,V>
didUplink(DidUplink didUplink)
boolean
dispatchDidClear(Link link, boolean preemptive)
boolean
dispatchDidMove(Link link, K key, S newShape, V newValue, S oldShape, V oldValue, boolean preemptive)
boolean
dispatchDidRemove(Link link, K key, S shape, V oldValue, boolean preemptive)
boolean
dispatchDidUpdate(Link link, K key, S shape, V newValue, V oldValue, boolean preemptive)
boolean
dispatchWillClear(Link link, boolean preemptive)
Map.Entry<Boolean,V>
dispatchWillMove(Link link, K key, S newShape, V newValue, S oldShape, boolean preemptive)
boolean
dispatchWillRemove(Link link, K key, S shape, boolean preemptive)
Map.Entry<Boolean,V>
dispatchWillUpdate(Link link, K key, S shape, V newValue, boolean preemptive)
V
get(Object key)
V
get(K key, S shape)
boolean
isEmpty()
boolean
isResident()
SpatialLane<K,S,V>
isResident(boolean isResident)
boolean
isTransient()
SpatialLane<K,S,V>
isTransient(boolean isTransient)
Iterator<SpatialMap.Entry<K,S,V>>
iterator()
Iterator<SpatialMap.Entry<K,S,V>>
iterator(S shape)
<K2> SpatialLane<K2,S,V>
keyClass(Class<K2> keyClass)
Form<K>
keyForm()
<K2> SpatialLane<K2,S,V>
keyForm(Form<K2> keyForm)
Iterator<K>
keyIterator()
SpatialLaneModel<S>
laneBinding()
void
laneDidClear()
V
laneDidMove(K key, S newShape, V newValue, S oldShape, V oldValue)
void
laneDidRemove(K key, S shape)
void
laneDidUpdate(K key, S shape, V newValue, V oldValue)
void
laneWillClear()
V
laneWillMove(K key, S newShape, V newValue, S oldShape)
void
laneWillRemove(K key, S shape)
V
laneWillUpdate(K key, S shape, V newValue)
V
move(K key, S oldShape, S newShape, V newValue)
SpatialLaneView<K,S,V>
observe(Object observer)
V
put(K key, S shape, V newValue)
V
remove(K key, S shape)
void
setKeyForm(Form<K> keyForm)
void
setLaneBinding(SpatialLaneModel<S> laneBinding)
void
setValueForm(Form<V> valueForm)
int
size()
SpatialMap<K,S,V>
snapshot()
protected Object
typesafeObservers(Object observers)
SpatialLaneView<K,S,V>
unobserve(Object observer)
<V2> SpatialLane<K,S,V2>
valueClass(Class<V2> valueClass)
Form<V>
valueForm()
<V2> SpatialLane<K,S,V2>
valueForm(Form<V2> valueForm)
Iterator<V>
valueIterator()
SpatialLane<K,S,V>
willClear(WillClear willClear)
SpatialLaneView<K,S,V>
willCommand(WillCommand willCommand)
SpatialLaneView<K,S,V>
willEnter(WillEnter willEnter)
SpatialLaneView<K,S,V>
willLeave(WillLeave willLeave)
protected void
willLoad()
SpatialLane<K,S,V>
willMove(WillMoveShape<K,S,V> willMove)
SpatialLane<K,S,V>
willRemove(WillRemoveShape<K,S> willRemove)
SpatialLane<K,S,V>
willUpdate(WillUpdateShape<K,S,V> willUpdate)
SpatialLaneView<K,S,V>
willUplink(WillUplink willUplink)
-
Methods inherited from class swim.runtime.warp.WarpLaneView
dispatchDidCommand, dispatchDidEnter, dispatchDidLeave, dispatchDidUplink, dispatchWillCommand, dispatchWillEnter, dispatchWillLeave, dispatchWillUplink, laneDidCommand, laneDidEnter, laneDidLeave, laneDidUplink, laneWillCommand, laneWillEnter, laneWillLeave, laneWillUplink
-
Methods inherited from class swim.runtime.LaneView
bindDownlink, closeDownlink, debug, error, hostUri, info, laneContext, laneDidFail, laneUri, meshUri, nodeUri, openDownlink, policy, pushDown, 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, 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
-
-
-
-
Field Detail
-
agentContext
protected final AgentContext agentContext
-
laneBinding
protected SpatialLaneModel<S> laneBinding
-
dataView
protected SpatialData<K,S,V> dataView
-
flags
protected int flags
-
-
Method Detail
-
agentContext
public AgentContext agentContext()
- Specified by:
agentContext
in classLaneView
-
laneBinding
public SpatialLaneModel<S> laneBinding()
- Specified by:
laneBinding
in classLaneView
-
setLaneBinding
public void setLaneBinding(SpatialLaneModel<S> laneBinding)
-
createLaneBinding
public LaneBinding createLaneBinding()
- Specified by:
createLaneBinding
in classLaneView
-
keyForm
public <K2> SpatialLane<K2,S,V> keyForm(Form<K2> keyForm)
- Specified by:
keyForm
in interfaceSpatialLane<K,S,V>
-
keyClass
public <K2> SpatialLane<K2,S,V> keyClass(Class<K2> keyClass)
- Specified by:
keyClass
in interfaceSpatialLane<K,S,V>
-
valueForm
public <V2> SpatialLane<K,S,V2> valueForm(Form<V2> valueForm)
- Specified by:
valueForm
in interfaceSpatialLane<K,S,V>
-
valueClass
public <V2> SpatialLane<K,S,V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceSpatialLane<K,S,V>
-
isResident
public final boolean isResident()
- Specified by:
isResident
in interfaceSpatialLane<K,S,V>
-
isResident
public SpatialLane<K,S,V> isResident(boolean isResident)
- Specified by:
isResident
in interfaceSpatialLane<K,S,V>
-
isTransient
public final boolean isTransient()
- Specified by:
isTransient
in interfaceSpatialLane<K,S,V>
-
isTransient
public SpatialLane<K,S,V> isTransient(boolean isTransient)
- Specified by:
isTransient
in interfaceSpatialLane<K,S,V>
-
willLoad
protected void willLoad()
- Overrides:
willLoad
in classAbstractTierBinding
-
close
public void close()
-
observe
public SpatialLaneView<K,S,V> observe(Object observer)
- Specified by:
observe
in interfaceLane
- Specified by:
observe
in interfaceObservable<K>
- Specified by:
observe
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
observe
in interfaceSpatialLane<K,S,V>
- Specified by:
observe
in interfaceWarpLane
- Overrides:
observe
in classWarpLaneView
-
unobserve
public SpatialLaneView<K,S,V> unobserve(Object observer)
- Specified by:
unobserve
in interfaceLane
- Specified by:
unobserve
in interfaceObservable<K>
- Specified by:
unobserve
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
unobserve
in interfaceSpatialLane<K,S,V>
- Specified by:
unobserve
in interfaceWarpLane
- Overrides:
unobserve
in classWarpLaneView
-
willUpdate
public SpatialLane<K,S,V> willUpdate(WillUpdateShape<K,S,V> willUpdate)
- Specified by:
willUpdate
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
willUpdate
in interfaceSpatialLane<K,S,V>
-
didUpdate
public SpatialLane<K,S,V> didUpdate(DidUpdateShape<K,S,V> didUpdate)
- Specified by:
didUpdate
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
didUpdate
in interfaceSpatialLane<K,S,V>
-
willMove
public SpatialLane<K,S,V> willMove(WillMoveShape<K,S,V> willMove)
- Specified by:
willMove
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
willMove
in interfaceSpatialLane<K,S,V>
-
didMove
public SpatialLane<K,S,V> didMove(DidMoveShape<K,S,V> didMove)
- Specified by:
didMove
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
didMove
in interfaceSpatialLane<K,S,V>
-
willRemove
public SpatialLane<K,S,V> willRemove(WillRemoveShape<K,S> willRemove)
- Specified by:
willRemove
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
willRemove
in interfaceSpatialLane<K,S,V>
-
didRemove
public SpatialLane<K,S,V> didRemove(DidRemoveShape<K,S,V> didRemove)
- Specified by:
didRemove
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
didRemove
in interfaceSpatialLane<K,S,V>
-
willClear
public SpatialLane<K,S,V> willClear(WillClear willClear)
- Specified by:
willClear
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
willClear
in interfaceSpatialLane<K,S,V>
-
didClear
public SpatialLane<K,S,V> didClear(DidClear didClear)
- Specified by:
didClear
in interfaceObservableSpatialMap<K,S,V>
- Specified by:
didClear
in interfaceSpatialLane<K,S,V>
-
willCommand
public SpatialLaneView<K,S,V> willCommand(WillCommand willCommand)
- Specified by:
willCommand
in interfaceSpatialLane<K,S,V>
- Specified by:
willCommand
in interfaceWarpLane
- Specified by:
willCommand
in classWarpLaneView
-
didCommand
public SpatialLaneView<K,S,V> didCommand(DidCommand didCommand)
- Specified by:
didCommand
in interfaceSpatialLane<K,S,V>
- Specified by:
didCommand
in interfaceWarpLane
- Specified by:
didCommand
in classWarpLaneView
-
willUplink
public SpatialLaneView<K,S,V> willUplink(WillUplink willUplink)
- Specified by:
willUplink
in interfaceSpatialLane<K,S,V>
- Specified by:
willUplink
in interfaceWarpLane
- Specified by:
willUplink
in classWarpLaneView
-
didUplink
public SpatialLaneView<K,S,V> didUplink(DidUplink didUplink)
- Specified by:
didUplink
in interfaceSpatialLane<K,S,V>
- Specified by:
didUplink
in interfaceWarpLane
- Specified by:
didUplink
in classWarpLaneView
-
willEnter
public SpatialLaneView<K,S,V> willEnter(WillEnter willEnter)
- Specified by:
willEnter
in interfaceSpatialLane<K,S,V>
- Specified by:
willEnter
in interfaceWarpLane
- Specified by:
willEnter
in classWarpLaneView
-
didEnter
public SpatialLaneView<K,S,V> didEnter(DidEnter didEnter)
- Specified by:
didEnter
in interfaceSpatialLane<K,S,V>
- Specified by:
didEnter
in interfaceWarpLane
- Specified by:
didEnter
in classWarpLaneView
-
willLeave
public SpatialLaneView<K,S,V> willLeave(WillLeave willLeave)
- Specified by:
willLeave
in interfaceSpatialLane<K,S,V>
- Specified by:
willLeave
in interfaceWarpLane
- Specified by:
willLeave
in classWarpLaneView
-
didLeave
public SpatialLaneView<K,S,V> didLeave(DidLeave didLeave)
- Specified by:
didLeave
in interfaceSpatialLane<K,S,V>
- Specified by:
didLeave
in interfaceWarpLane
- Specified by:
didLeave
in classWarpLaneView
-
dispatchWillUpdate
public Map.Entry<Boolean,V> dispatchWillUpdate(Link link, K key, S shape, V newValue, boolean preemptive)
-
dispatchDidUpdate
public boolean dispatchDidUpdate(Link link, K key, S shape, V newValue, V oldValue, boolean preemptive)
-
dispatchWillMove
public Map.Entry<Boolean,V> dispatchWillMove(Link link, K key, S newShape, V newValue, S oldShape, boolean preemptive)
-
dispatchDidMove
public boolean dispatchDidMove(Link link, K key, S newShape, V newValue, S oldShape, V oldValue, boolean preemptive)
-
dispatchWillRemove
public boolean dispatchWillRemove(Link link, K key, S shape, boolean preemptive)
-
dispatchDidRemove
public boolean dispatchDidRemove(Link link, K key, S shape, V oldValue, boolean preemptive)
-
dispatchWillClear
public boolean dispatchWillClear(Link link, boolean preemptive)
-
dispatchDidClear
public boolean dispatchDidClear(Link link, boolean preemptive)
-
laneWillClear
public void laneWillClear()
-
laneDidClear
public void laneDidClear()
-
snapshot
public SpatialMap<K,S,V> snapshot()
- Specified by:
snapshot
in interfaceSpatialLane<K,S,V>
-
iterator
public Iterator<SpatialMap.Entry<K,S,V>> iterator()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceSpatialMap<K,S,V>
-
size
public int size()
- Specified by:
size
in interfaceSpatialMap<K,S,V>
-
containsKey
public boolean containsKey(K key, S shape)
- Specified by:
containsKey
in interfaceSpatialMap<K,S,V>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceSpatialMap<K,S,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceSpatialMap<K,S,V>
-
move
public V move(K key, S oldShape, S newShape, V newValue)
- Specified by:
move
in interfaceSpatialMap<K,S,V>
-
clear
public void clear()
- Specified by:
clear
in interfaceSpatialMap<K,S,V>
-
iterator
public Iterator<SpatialMap.Entry<K,S,V>> iterator(S shape)
- Specified by:
iterator
in interfaceSpatialMap<K,S,V>
-
keyIterator
public Iterator<K> keyIterator()
- Specified by:
keyIterator
in interfaceSpatialMap<K,S,V>
-
valueIterator
public Iterator<V> valueIterator()
- Specified by:
valueIterator
in interfaceSpatialMap<K,S,V>
-
-