- java.lang.Object
-
- swim.system.AbstractWarpRef
-
- swim.system.AbstractTierBinding
-
- swim.system.router.HostTable
-
- All Implemented Interfaces:
DownlinkFactory
,WarpRef
,CellBinding
,CellContext
,HostBinding
,TierBinding
,Log
public class HostTable extends AbstractTierBinding implements HostBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected HostContext
hostContext
-
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 HostTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
accumulateNodeProfile(NodeProfile profile)
protected void
accumulateWarpDownlinkProfile(WarpDownlinkProfile profile)
LinkBinding
bindDownlink(Downlink downlink)
<T> T
bottomHost(Class<T> hostClass)
HostAddress
cellAddress()
void
closeDownlink(LinkBinding link)
void
closeNode(Uri nodeUri)
void
closeNodes()
protected HostProfile
collectProfile(long dt)
protected NodeContext
createNodeContext(NodeAddress nodeAddress, NodeBinding node)
protected void
cueAncestorNodes(Uri nodeUri)
void
debug(Object message)
Logs a debug-level message.void
didBecomeMaster()
void
didBecomeSlave()
void
didClose()
protected void
didCloseNode(NodeBinding node)
void
didFail(Throwable error)
protected void
didOpenNode(NodeBinding node)
protected void
didUpdateMetrics()
String
edgeName()
void
error(Object message)
Logs an error-level message.void
fail(Object message)
Logs an fail-level message.protected void
flushMetrics()
NodeBinding
getNode(Uri nodeUri)
HostContext
hostContext()
Uri
hostUri()
HostBinding
hostWrapper()
void
info(Object message)
Logs an info-level message.boolean
isConnected()
boolean
isMaster()
boolean
isPrimary()
boolean
isRemote()
boolean
isReplica()
boolean
isSecure()
boolean
isSlave()
Uri
meshUri()
UriMapper<NodeBinding>
nodes()
void
openDownlink(LinkBinding link)
protected void
openLogLanes(HostBinding host, AgentNode metaHost)
void
openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
void
openMetaHost(HostBinding host, NodeBinding metaHost)
void
openMetaLane(LaneBinding lane, NodeBinding metaLane)
protected void
openMetaLanes(HostBinding host, AgentNode metaHost)
void
openMetaNode(NodeBinding node, NodeBinding metaNode)
void
openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
NodeBinding
openNode(Uri nodeUri)
NodeBinding
openNode(Uri nodeUri, NodeBinding node)
protected void
openReflectLanes(HostBinding host, AgentNode metaHost)
void
openUplink(LinkBinding link)
PartBinding
part()
Value
partKey()
Policy
policy()
void
pushDown(Push<?> push)
void
pushUp(Push<?> push)
void
reportDown(Metric metric)
protected void
reportMetrics(long dt)
Schedule
schedule()
void
setHostContext(HostContext hostContext)
void
setPrimary(boolean isPrimary)
void
setReplica(boolean isReplica)
Stage
stage()
StoreBinding
store()
TierContext
tierContext()
void
trace(Object message)
Logs a trace-level message.<T> T
unwrapHost(Class<T> hostClass)
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
-
-
-
-
Field Detail
-
hostContext
protected HostContext hostContext
-
-
Method Detail
-
tierContext
public final TierContext tierContext()
- Specified by:
tierContext
in interfaceTierBinding
- Specified by:
tierContext
in classAbstractTierBinding
-
part
public final PartBinding part()
- Specified by:
part
in interfaceHostBinding
-
hostWrapper
public final HostBinding hostWrapper()
- Specified by:
hostWrapper
in interfaceHostBinding
-
hostContext
public final HostContext hostContext()
- Specified by:
hostContext
in interfaceHostBinding
-
setHostContext
public void setHostContext(HostContext hostContext)
- Specified by:
setHostContext
in interfaceHostBinding
-
unwrapHost
public <T> T unwrapHost(Class<T> hostClass)
- Specified by:
unwrapHost
in interfaceHostBinding
-
bottomHost
public <T> T bottomHost(Class<T> hostClass)
- Specified by:
bottomHost
in interfaceHostBinding
-
createNodeContext
protected NodeContext createNodeContext(NodeAddress nodeAddress, NodeBinding node)
-
cellAddress
public final HostAddress cellAddress()
- Specified by:
cellAddress
in interfaceCellContext
- Specified by:
cellAddress
in interfaceHostBinding
-
edgeName
public final String edgeName()
- Specified by:
edgeName
in interfaceCellContext
-
meshUri
public final Uri meshUri()
- Specified by:
meshUri
in interfaceCellContext
- Specified by:
meshUri
in interfaceHostBinding
-
partKey
public final Value partKey()
- Specified by:
partKey
in interfaceHostBinding
-
hostUri
public final Uri hostUri()
- Specified by:
hostUri
in interfaceHostBinding
-
policy
public Policy policy()
- Specified by:
policy
in interfaceCellContext
-
schedule
public Schedule schedule()
- Specified by:
schedule
in interfaceCellContext
-
stage
public Stage stage()
- Specified by:
stage
in interfaceCellContext
-
store
public StoreBinding store()
- Specified by:
store
in interfaceCellContext
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceHostBinding
-
isRemote
public boolean isRemote()
- Specified by:
isRemote
in interfaceHostBinding
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interfaceHostBinding
-
isPrimary
public boolean isPrimary()
- Specified by:
isPrimary
in interfaceHostBinding
-
setPrimary
public void setPrimary(boolean isPrimary)
- Specified by:
setPrimary
in interfaceHostBinding
-
isReplica
public boolean isReplica()
- Specified by:
isReplica
in interfaceHostBinding
-
setReplica
public void setReplica(boolean isReplica)
- Specified by:
setReplica
in interfaceHostBinding
-
isMaster
public boolean isMaster()
- Specified by:
isMaster
in interfaceHostBinding
-
isSlave
public boolean isSlave()
- Specified by:
isSlave
in interfaceHostBinding
-
didBecomeMaster
public void didBecomeMaster()
- Specified by:
didBecomeMaster
in interfaceHostBinding
-
didBecomeSlave
public void didBecomeSlave()
- Specified by:
didBecomeSlave
in interfaceHostBinding
-
openMetaHost
public void openMetaHost(HostBinding host, NodeBinding metaHost)
- Specified by:
openMetaHost
in interfaceHostBinding
-
openMetaLanes
protected void openMetaLanes(HostBinding host, AgentNode metaHost)
-
openReflectLanes
protected void openReflectLanes(HostBinding host, AgentNode metaHost)
-
openLogLanes
protected void openLogLanes(HostBinding host, AgentNode metaHost)
-
nodes
public UriMapper<NodeBinding> nodes()
- Specified by:
nodes
in interfaceHostBinding
-
getNode
public NodeBinding getNode(Uri nodeUri)
- Specified by:
getNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri)
- Specified by:
openNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri, NodeBinding node)
- Specified by:
openNode
in interfaceHostBinding
-
closeNode
public void closeNode(Uri nodeUri)
-
closeNodes
public void closeNodes()
-
didOpenNode
protected void didOpenNode(NodeBinding node)
-
didCloseNode
protected void didCloseNode(NodeBinding node)
-
cueAncestorNodes
protected void cueAncestorNodes(Uri nodeUri)
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNode
in interfaceHostBinding
-
openMetaLane
public void openMetaLane(LaneBinding lane, NodeBinding metaLane)
- Specified by:
openMetaLane
in interfaceHostBinding
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceHostBinding
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceCellContext
-
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
-
openUplink
public void openUplink(LinkBinding link)
- Specified by:
openUplink
in interfaceCellBinding
-
pushUp
public void pushUp(Push<?> push)
- Specified by:
pushUp
in interfaceCellBinding
-
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
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDown
in interfaceCellContext
-
accumulateNodeProfile
protected void accumulateNodeProfile(NodeProfile profile)
-
accumulateWarpDownlinkProfile
protected void accumulateWarpDownlinkProfile(WarpDownlinkProfile profile)
-
didUpdateMetrics
protected void didUpdateMetrics()
-
flushMetrics
protected void flushMetrics()
-
reportMetrics
protected void reportMetrics(long dt)
-
collectProfile
protected HostProfile collectProfile(long dt)
-
-