Module swim.system
Package swim.system
Class LaneModel<View extends LaneView,U extends AbstractUplinkContext>
- java.lang.Object
-
- swim.system.AbstractWarpRef
-
- swim.system.AbstractTierBinding
-
- swim.system.LaneModel<View,U>
-
- All Implemented Interfaces:
DownlinkFactory
,WarpRef
,CellBinding
,CellContext
,LaneBinding
,TierBinding
,Log
- Direct Known Subclasses:
HttpLaneModel
,WarpLaneModel
public abstract class LaneModel<View extends LaneView,U extends AbstractUplinkContext> extends AbstractTierBinding implements LaneBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected LaneContext
laneContext
protected FingerTrieSeq<U>
uplinks
protected static AtomicReferenceFieldUpdater<LaneModel<?,?>,FingerTrieSeq<? extends LinkContext>>
UPLINKS
protected Object
views
protected static AtomicReferenceFieldUpdater<LaneModel<?,?>,Object>
VIEWS
-
Fields inherited from class swim.system.AbstractTierBinding
CLOSED_PHASE, CLOSED_STATE, CLOSING_STATE, FAILED_STATE, FAILING_STATE, LOADED_PHASE, LOADED_STATE, LOADING_STATE, OPENED_PHASE, OPENED_STATE, OPENING_STATE, PHASE_MASK, PHASE_SHIFT, RECOVERING_STATE, STARTED_PHASE, STARTED_STATE, STARTING_STATE, STATE_MASK, status, STATUS, STOPPING_STATE, UNLOADING_STATE
-
-
Constructor Summary
Constructors Constructor Description LaneModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
accumulateExecTime(long execDelta)
LinkBinding
bindDownlink(Downlink downlink)
<T> T
bottomLane(Class<T> laneClass)
LaneAddress
cellAddress()
void
closeDownlink(LinkBinding link)
void
closeLaneView(Lane view)
void
closeUplink(Value linkKey)
protected abstract U
createUplink(LinkBinding link)
protected UplinkAddress
createUplinkAddress(LinkBinding link)
void
debug(Object message)
Logs a debug-level message.void
didClose()
protected void
didCloseLaneView(View view)
protected void
didCloseUplink(U uplink)
void
didFail(Throwable error)
protected abstract void
didOpenLaneView(View view)
protected void
didOpenUplink(U uplink)
String
edgeName()
void
error(Object message)
Logs an error-level message.void
fail(Object message)
Logs an fail-level message.Lane
getLaneView(AgentContext agentContext)
LinkContext
getUplink(Value linkKey)
Uri
hostUri()
void
info(Object message)
Logs an info-level message.boolean
isLinked()
LaneContext
laneContext()
Uri
laneUri()
LaneBinding
laneWrapper()
Uri
meshUri()
NodeBinding
node()
Uri
nodeUri()
void
openDownlink(LinkBinding link)
void
openLaneView(Lane view)
void
openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
void
openMetaLane(LaneBinding lane, NodeBinding metaLane)
protected void
openMetaLanes(LaneBinding lane, AgentNode metaLane)
void
openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
protected void
openReflectLanes(LaneBinding lane, AgentNode metaLane)
void
openUplink(LinkBinding link)
Value
partKey()
Policy
policy()
void
pushDown(Push<?> push)
abstract void
pushUp(Push<?> push)
abstract void
pushUpCommand(Push<CommandMessage> push)
void
reportDown(Metric metric)
Schedule
schedule()
void
setLaneContext(LaneContext laneContext)
Stage
stage()
StoreBinding
store()
TierContext
tierContext()
void
trace(Object message)
Logs a trace-level message.<T> T
unwrapLane(Class<T> laneClass)
FingerTrieSeq<LinkContext>
uplinks()
void
warn(Object message)
Logs a warn-level message.protected void
willClose()
protected void
willLoad()
protected void
willOpen()
protected void
willStart()
protected void
willStop()
protected void
willUnload()
-
Methods inherited from class swim.system.AbstractTierBinding
activate, awaitStart, close, didLoad, didOpen, didStart, didStop, didUnload, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload
-
Methods inherited from class swim.system.AbstractWarpRef
command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.system.LaneBinding
laneType
-
-
-
-
Field Detail
-
laneContext
protected LaneContext laneContext
-
views
protected volatile Object views
-
uplinks
protected volatile FingerTrieSeq<U extends AbstractUplinkContext> uplinks
-
VIEWS
protected static final AtomicReferenceFieldUpdater<LaneModel<?,?>,Object> VIEWS
-
UPLINKS
protected static final AtomicReferenceFieldUpdater<LaneModel<?,?>,FingerTrieSeq<? extends LinkContext>> UPLINKS
-
-
Method Detail
-
tierContext
public final TierContext tierContext()
- Specified by:
tierContext
in interfaceTierBinding
- Specified by:
tierContext
in classAbstractTierBinding
-
node
public final NodeBinding node()
- Specified by:
node
in interfaceLaneBinding
-
laneWrapper
public final LaneBinding laneWrapper()
- Specified by:
laneWrapper
in interfaceLaneBinding
-
laneContext
public final LaneContext laneContext()
- Specified by:
laneContext
in interfaceLaneBinding
-
setLaneContext
public void setLaneContext(LaneContext laneContext)
- Specified by:
setLaneContext
in interfaceLaneBinding
-
unwrapLane
public <T> T unwrapLane(Class<T> laneClass)
- Specified by:
unwrapLane
in interfaceLaneBinding
-
bottomLane
public <T> T bottomLane(Class<T> laneClass)
- Specified by:
bottomLane
in interfaceLaneBinding
-
createUplink
protected abstract U createUplink(LinkBinding link)
-
createUplinkAddress
protected UplinkAddress createUplinkAddress(LinkBinding link)
-
cellAddress
public LaneAddress cellAddress()
- Specified by:
cellAddress
in interfaceCellContext
- Specified by:
cellAddress
in interfaceLaneBinding
-
edgeName
public String edgeName()
- Specified by:
edgeName
in interfaceCellContext
-
meshUri
public final Uri meshUri()
- Specified by:
meshUri
in interfaceCellContext
- Specified by:
meshUri
in interfaceLaneBinding
-
partKey
public final Value partKey()
- Specified by:
partKey
in interfaceLaneBinding
-
hostUri
public final Uri hostUri()
- Specified by:
hostUri
in interfaceLaneBinding
-
nodeUri
public final Uri nodeUri()
- Specified by:
nodeUri
in interfaceLaneBinding
-
laneUri
public final Uri laneUri()
- Specified by:
laneUri
in interfaceLaneBinding
-
policy
public Policy policy()
- Specified by:
policy
in interfaceCellContext
-
schedule
public Schedule schedule()
- Specified by:
schedule
in interfaceCellContext
- Specified by:
schedule
in interfaceLaneBinding
-
stage
public Stage stage()
- Specified by:
stage
in interfaceCellContext
- Specified by:
stage
in interfaceLaneBinding
-
store
public StoreBinding store()
- Specified by:
store
in interfaceCellContext
- Specified by:
store
in interfaceLaneBinding
-
getLaneView
public Lane getLaneView(AgentContext agentContext)
- Specified by:
getLaneView
in interfaceLaneBinding
-
openLaneView
public void openLaneView(Lane view)
- Specified by:
openLaneView
in interfaceLaneBinding
-
closeLaneView
public void closeLaneView(Lane view)
- Specified by:
closeLaneView
in interfaceLaneBinding
-
isLinked
public boolean isLinked()
- Specified by:
isLinked
in interfaceLaneBinding
-
uplinks
public FingerTrieSeq<LinkContext> uplinks()
- Specified by:
uplinks
in interfaceLaneBinding
-
getUplink
public LinkContext getUplink(Value linkKey)
- Specified by:
getUplink
in interfaceLaneBinding
-
openUplink
public void openUplink(LinkBinding link)
- Specified by:
openUplink
in interfaceCellBinding
-
closeUplink
public void closeUplink(Value linkKey)
- Specified by:
closeUplink
in interfaceLaneBinding
-
openMetaLane
public void openMetaLane(LaneBinding lane, NodeBinding metaLane)
- Specified by:
openMetaLane
in interfaceLaneBinding
-
openMetaLanes
protected void openMetaLanes(LaneBinding lane, AgentNode metaLane)
-
openReflectLanes
protected void openReflectLanes(LaneBinding lane, AgentNode metaLane)
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceLaneBinding
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceCellContext
- Specified by:
openMetaDownlink
in interfaceLaneBinding
-
pushUp
public abstract void pushUp(Push<?> push)
- Specified by:
pushUp
in interfaceCellBinding
-
pushUpCommand
public abstract void pushUpCommand(Push<CommandMessage> push)
- Specified by:
pushUpCommand
in interfaceLaneBinding
-
didOpenLaneView
protected abstract void didOpenLaneView(View view)
-
didCloseLaneView
protected void didCloseLaneView(View view)
-
didOpenUplink
protected void didOpenUplink(U uplink)
-
didCloseUplink
protected void didCloseUplink(U uplink)
-
bindDownlink
public LinkBinding bindDownlink(Downlink downlink)
- Specified by:
bindDownlink
in interfaceCellContext
-
openDownlink
public void openDownlink(LinkBinding link)
- Specified by:
openDownlink
in interfaceCellContext
-
closeDownlink
public void closeDownlink(LinkBinding link)
- Specified by:
closeDownlink
in interfaceCellContext
-
pushDown
public void pushDown(Push<?> push)
- Specified by:
pushDown
in interfaceCellContext
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDown
in interfaceCellContext
- Specified by:
reportDown
in interfaceLaneBinding
-
trace
public void trace(Object message)
Description copied from interface:Log
Logs a trace-level message.
-
debug
public void debug(Object message)
Description copied from interface:Log
Logs a debug-level message.
-
info
public void info(Object message)
Description copied from interface:Log
Logs an info-level message.
-
warn
public void warn(Object message)
Description copied from interface:Log
Logs a warn-level message.
-
error
public void error(Object message)
Description copied from interface:Log
Logs an error-level message.
-
fail
public void fail(Object message)
Description copied from interface:Log
Logs an fail-level message.
-
willOpen
protected void willOpen()
- Overrides:
willOpen
in classAbstractTierBinding
-
willLoad
protected void willLoad()
- Overrides:
willLoad
in classAbstractTierBinding
-
willStart
protected void willStart()
- Overrides:
willStart
in classAbstractTierBinding
-
willStop
protected void willStop()
- Overrides:
willStop
in classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnload
in classAbstractTierBinding
-
willClose
protected void willClose()
- Overrides:
willClose
in classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClose
in interfaceTierBinding
- Overrides:
didClose
in classAbstractTierBinding
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceTierBinding
- Overrides:
didFail
in classAbstractTierBinding
-
accumulateExecTime
public void accumulateExecTime(long execDelta)
-
-