- java.lang.Object
-
- swim.system.AbstractWarpRef
-
- swim.system.AbstractTierBinding
-
- swim.system.agent.AgentNode
-
- swim.system.agent.AgentModel
-
- All Implemented Interfaces:
Executor
,DownlinkFactory
,LaneFactory
,WarpRef
,Schedule
,Stage
,Task
,TaskFunction
,CellBinding
,CellContext
,NodeBinding
,TierBinding
,Log
public class AgentModel extends AgentNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Value
props
-
Fields inherited from class swim.system.agent.AgentNode
nodeContext, taskContext
-
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 AgentModel(Value props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulateExecTime(long agentExecDelta)
protected void
accumulateWarpDownlinkProfile(WarpDownlinkProfile profile)
protected void
accumulateWarpLaneProfile(WarpLaneProfile profile)
AgentView
addAgentView(AgentView view)
FingerTrieSeq<Value>
agentIds()
FingerTrieSeq<Agent>
agents()
protected NodeProfile
collectProfile(long dt)
AgentView
createAgent(AgentFactory<?> agentFactory, Value id, Value props)
void
debug(Object message)
Logs a debug-level message.void
didClose()
protected void
didCloseAgentView(AgentView view)
protected void
didCloseLane(LaneBinding lane)
void
didFail(Throwable error)
protected void
didLoad()
protected void
didOpen()
protected void
didOpenAgent(AgentView view)
protected void
didOpenLane(LaneBinding lane)
protected void
didStart()
protected void
didStop()
protected void
didUnload()
protected void
didUpdateMetrics()
void
error(Object message)
Logs an error-level message.void
fail(Object message)
Logs an fail-level message.protected void
flushMetrics()
<S extends Agent>
SgetAgent(Class<S> agentClass)
AgentView
getAgentView(Value id)
void
info(Object message)
Logs an info-level message.<S extends Agent>
SopenAgent(Value id, Value props, AgentFactory<S> agentFactory)
protected void
openLogLanes(NodeBinding node, AgentNode metaNode)
protected void
openMetaLanes(NodeBinding node, AgentNode metaNode)
void
openMetaNode(NodeBinding node, NodeBinding metaNode)
protected void
openReflectLanes(NodeBinding node, AgentNode metaNode)
Value
props()
void
pushUp(Push<?> push)
void
removeAgentView(AgentView view)
void
reportDown(Metric metric)
protected void
reportMetrics(long dt)
void
setNodeContext(NodeContext nodeContext)
void
trace(Object message)
Logs a trace-level message.void
warn(Object message)
Logs a warn-level message.void
willClose()
protected void
willLoad()
protected void
willOpen()
protected void
willStart()
protected void
willStop()
protected void
willUnload()
-
Methods inherited from class swim.system.agent.AgentNode
asyncStage, bindDownlink, bottomNode, call, cellAddress, closeDownlink, closeLane, commandLane, createAgentFactory, createAgentFactory, createdTime, createLaneContext, demandLane, demandMapLane, edgeName, execute, geospatialLane, getLane, host, hostUri, httpLane, identity, joinMapLane, joinValueLane, lanes, listLane, mapLane, meshUri, nodeContext, nodeUri, nodeWrapper, normalizedLaneUri, openAgents, openDownlink, openLane, openLane, openLane, openLanes, openLaneView, openMetaDownlink, openMetaLane, openMetaUplink, openUnknownUplink, openUplink, partKey, policy, pushDown, runTask, schedule, setTaskContext, setTimer, spatialLane, stage, store, supplyLane, task, taskContext, taskDidCancel, taskWillBlock, taskWillCue, tierContext, timer, unwrapNode, valueLane, wsLane
-
Methods inherited from class swim.system.AbstractTierBinding
activate, awaitStart, close, 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
-
-
-
-
Field Detail
-
props
protected final Value props
-
-
Constructor Detail
-
AgentModel
public AgentModel(Value props)
-
-
Method Detail
-
setNodeContext
public void setNodeContext(NodeContext nodeContext)
- Specified by:
setNodeContext
in interfaceNodeBinding
- Overrides:
setNodeContext
in classAgentNode
-
props
public Value props()
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNode
in interfaceNodeBinding
- Overrides:
openMetaNode
in classAgentNode
-
openMetaLanes
protected void openMetaLanes(NodeBinding node, AgentNode metaNode)
-
openReflectLanes
protected void openReflectLanes(NodeBinding node, AgentNode metaNode)
-
openLogLanes
protected void openLogLanes(NodeBinding node, AgentNode metaNode)
-
agentIds
public FingerTrieSeq<Value> agentIds()
- Specified by:
agentIds
in interfaceNodeBinding
- Overrides:
agentIds
in classAgentNode
-
agents
public FingerTrieSeq<Agent> agents()
- Specified by:
agents
in interfaceNodeBinding
- Overrides:
agents
in classAgentNode
-
createAgent
public AgentView createAgent(AgentFactory<?> agentFactory, Value id, Value props)
-
openAgent
public <S extends Agent> S openAgent(Value id, Value props, AgentFactory<S> agentFactory)
-
removeAgentView
public void removeAgentView(AgentView view)
-
didOpenLane
protected void didOpenLane(LaneBinding lane)
- Overrides:
didOpenLane
in classAgentNode
-
didCloseLane
protected void didCloseLane(LaneBinding lane)
- Overrides:
didCloseLane
in classAgentNode
-
pushUp
public void pushUp(Push<?> push)
- Specified by:
pushUp
in interfaceCellBinding
- Overrides:
pushUp
in classAgentNode
-
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.
-
didOpenAgent
protected void didOpenAgent(AgentView view)
-
didCloseAgentView
protected void didCloseAgentView(AgentView view)
-
didOpen
protected void didOpen()
- Overrides:
didOpen
in classAbstractTierBinding
-
didLoad
protected void didLoad()
- Overrides:
didLoad
in classAbstractTierBinding
-
didStart
protected void didStart()
- Overrides:
didStart
in classAbstractTierBinding
-
didStop
protected void didStop()
- Overrides:
didStop
in classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnload
in classAgentNode
-
didUnload
protected void didUnload()
- Overrides:
didUnload
in classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClose
in interfaceTierBinding
- Overrides:
didClose
in classAgentNode
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceTierBinding
- Overrides:
didFail
in classAgentNode
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDown
in interfaceCellContext
- Overrides:
reportDown
in classAgentNode
-
accumulateExecTime
public void accumulateExecTime(long agentExecDelta)
-
accumulateWarpLaneProfile
protected void accumulateWarpLaneProfile(WarpLaneProfile profile)
-
accumulateWarpDownlinkProfile
protected void accumulateWarpDownlinkProfile(WarpDownlinkProfile profile)
-
didUpdateMetrics
protected void didUpdateMetrics()
-
flushMetrics
protected void flushMetrics()
-
reportMetrics
protected void reportMetrics(long dt)
-
collectProfile
protected NodeProfile collectProfile(long dt)
-
-