- java.lang.Object
-
- swim.runtime.AbstractWarpRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.agent.AgentNode
-
- swim.runtime.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 Valueprops-
Fields inherited from class swim.runtime.agent.AgentNode
nodeContext, taskContext
-
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 AgentModel(Value props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccumulateExecTime(long agentExecDelta)protected voidaccumulateWarpDownlinkProfile(WarpDownlinkProfile profile)protected voidaccumulateWarpLaneProfile(WarpLaneProfile profile)AgentViewaddAgentView(AgentView view)FingerTrieSeq<Value>agentIds()FingerTrieSeq<Agent>agents()protected NodeProfilecollectProfile(long dt)AgentViewcreateAgent(AgentFactory<?> agentFactory, Value id, Value props)voiddebug(Object message)Logs a debug-level message.voiddidClose()protected voiddidCloseAgentView(AgentView view)protected voiddidCloseLane(LaneBinding lane)voiddidFail(Throwable error)protected voiddidLoad()protected voiddidOpen()protected voiddidOpenAgent(AgentView view)protected voiddidOpenLane(LaneBinding lane)protected voiddidStart()protected voiddidStop()protected voiddidUnload()protected voiddidUpdateMetrics()voiderror(Object message)Logs an error-level message.voidfail(Object message)Logs an fail-level message.protected voidflushMetrics()<S extends Agent>
SgetAgent(Class<S> agentClass)AgentViewgetAgentView(Value id)voidinfo(Object message)Logs an info-level message.<S extends Agent>
SopenAgent(Value id, Value props, AgentFactory<S> agentFactory)protected voidopenLogLanes(NodeBinding node, AgentNode metaNode)protected voidopenMetaLanes(NodeBinding node, AgentNode metaNode)voidopenMetaNode(NodeBinding node, NodeBinding metaNode)protected voidopenReflectLanes(NodeBinding node, AgentNode metaNode)Valueprops()voidpushUp(Push<?> push)voidremoveAgentView(AgentView view)voidreportDown(Metric metric)protected voidreportMetrics(long dt)voidsetNodeContext(NodeContext nodeContext)voidtrace(Object message)Logs a trace-level message.voidwarn(Object message)Logs a warn-level message.voidwillClose()protected voidwillLoad()protected voidwillOpen()protected voidwillStart()protected voidwillStop()protected voidwillUnload()-
Methods inherited from class swim.runtime.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.runtime.AbstractTierBinding
activate, close, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload
-
Methods inherited from class swim.runtime.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:
setNodeContextin interfaceNodeBinding- Overrides:
setNodeContextin classAgentNode
-
props
public Value props()
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNodein interfaceNodeBinding- Overrides:
openMetaNodein 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:
agentIdsin interfaceNodeBinding- Overrides:
agentIdsin classAgentNode
-
agents
public FingerTrieSeq<Agent> agents()
- Specified by:
agentsin interfaceNodeBinding- Overrides:
agentsin 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:
didOpenLanein classAgentNode
-
didCloseLane
protected void didCloseLane(LaneBinding lane)
- Overrides:
didCloseLanein classAgentNode
-
pushUp
public void pushUp(Push<?> push)
- Specified by:
pushUpin interfaceCellBinding- Overrides:
pushUpin classAgentNode
-
trace
public void trace(Object message)
Description copied from interface:LogLogs a trace-level message.
-
debug
public void debug(Object message)
Description copied from interface:LogLogs a debug-level message.
-
info
public void info(Object message)
Description copied from interface:LogLogs an info-level message.
-
warn
public void warn(Object message)
Description copied from interface:LogLogs a warn-level message.
-
error
public void error(Object message)
Description copied from interface:LogLogs an error-level message.
-
fail
public void fail(Object message)
Description copied from interface:LogLogs an fail-level message.
-
didOpenAgent
protected void didOpenAgent(AgentView view)
-
didCloseAgentView
protected void didCloseAgentView(AgentView view)
-
didOpen
protected void didOpen()
- Overrides:
didOpenin classAbstractTierBinding
-
didLoad
protected void didLoad()
- Overrides:
didLoadin classAbstractTierBinding
-
didStart
protected void didStart()
- Overrides:
didStartin classAbstractTierBinding
-
didStop
protected void didStop()
- Overrides:
didStopin classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnloadin classAgentNode
-
didUnload
protected void didUnload()
- Overrides:
didUnloadin classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClosein interfaceTierBinding- Overrides:
didClosein classAgentNode
-
didFail
public void didFail(Throwable error)
- Specified by:
didFailin interfaceTierBinding- Overrides:
didFailin classAgentNode
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDownin interfaceCellContext- Overrides:
reportDownin 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)
-
-