- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.agent.AgentNode
-
- swim.runtime.agent.AgentModel
-
- All Implemented Interfaces:
Executor,swim.api.downlink.DownlinkFactory,swim.api.lane.LaneFactory,swim.api.ref.SwimRef,swim.concurrent.Schedule,swim.concurrent.Stage,swim.concurrent.Task,swim.concurrent.TaskFunction,CellBinding,CellContext,NodeBinding,TierBinding,swim.util.Log
public class AgentModel extends AgentNode
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.structure.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(swim.structure.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)swim.collections.FingerTrieSeq<swim.structure.Value>agentIds()swim.collections.FingerTrieSeq<swim.api.agent.Agent>agents()protected NodeProfilecollectProfile(long dt)AgentViewcreateAgent(swim.api.agent.AgentFactory<?> agentFactory, swim.structure.Value id, swim.structure.Value props)voiddebug(Object 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)voidfail(Object message)protected voidflushMetrics()<S extends swim.api.agent.Agent>
SgetAgent(Class<S> agentClass)AgentViewgetAgentView(swim.structure.Value id)voidinfo(Object message)<S extends swim.api.agent.Agent>
SopenAgent(swim.structure.Value id, swim.structure.Value props, swim.api.agent.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)swim.structure.Valueprops()voidpushUp(Push<?> push)voidremoveAgentView(AgentView view)voidreportDown(Metric metric)protected voidreportMetrics(long dt)voidsetNodeContext(NodeContext nodeContext)voidtrace(Object message)voidwarn(Object 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, normalizezLaneUri, 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.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
-
-
-
-
Method Detail
-
setNodeContext
public void setNodeContext(NodeContext nodeContext)
- Specified by:
setNodeContextin interfaceNodeBinding- Overrides:
setNodeContextin classAgentNode
-
props
public swim.structure.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 swim.collections.FingerTrieSeq<swim.structure.Value> agentIds()
- Specified by:
agentIdsin interfaceNodeBinding- Overrides:
agentIdsin classAgentNode
-
agents
public swim.collections.FingerTrieSeq<swim.api.agent.Agent> agents()
- Specified by:
agentsin interfaceNodeBinding- Overrides:
agentsin classAgentNode
-
getAgentView
public AgentView getAgentView(swim.structure.Value id)
-
getAgent
public <S extends swim.api.agent.Agent> S getAgent(Class<S> agentClass)
-
createAgent
public AgentView createAgent(swim.api.agent.AgentFactory<?> agentFactory, swim.structure.Value id, swim.structure.Value props)
-
openAgent
public <S extends swim.api.agent.Agent> S openAgent(swim.structure.Value id, swim.structure.Value props, swim.api.agent.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)
-
debug
public void debug(Object message)
-
info
public void info(Object message)
-
warn
public void warn(Object message)
-
error
public void error(Object message)
-
fail
public void fail(Object 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)
-
-