public class HostTracker extends Object implements Serializable
HostsFileBasedInfrastructureManager
and HostTracker
instances are persisted along with the node source data.
All non-final fields of this class should be thread-safe.Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
HostTracker(String configuredAddress,
int configuredNodeNumber,
InetAddress resolvedAddress) |
Modifier and Type | Method and Description |
---|---|
protected int |
addAndGetLostNodeNotification() |
protected String |
getConfiguredAddress() |
protected int |
getConfiguredNodeNumber() |
protected int |
getNeededNodesNumber()
Compute the number of nodes that are needed by this host at that
moment.
|
protected InetAddress |
getResolvedAddress() |
protected boolean |
hasAliveNodes() |
protected boolean |
needsNodes() |
protected void |
putAliveNodeUrl(String aliveNodeUrl)
Registers the URL of an alive node and increment the alive node counter.
|
protected void |
putDownNodeUrl(String downNodeUrl)
Registers the URL of a down node and increment the down node counter.
|
protected void |
putRemovedNodeUrl(String removedNodeUrl)
Registers the URL of a removed node and increment the removed node
counter.
|
protected void |
resetLostNodeNotifications() |
protected void |
setNeedsNodes(boolean needNodesFlag)
Say whether this host requires nodes.
|
String |
toString() |
protected HostTracker(String configuredAddress, int configuredNodeNumber, InetAddress resolvedAddress)
protected String getConfiguredAddress()
protected InetAddress getResolvedAddress()
InetAddress
representation of the hostprotected boolean needsNodes()
protected void setNeedsNodes(boolean needNodesFlag)
protected int addAndGetLostNodeNotification()
protected void resetLostNodeNotifications()
protected int getConfiguredNodeNumber()
protected int getNeededNodesNumber()
protected boolean hasAliveNodes()
protected void putAliveNodeUrl(String aliveNodeUrl)
protected void putDownNodeUrl(String downNodeUrl)
protected void putRemovedNodeUrl(String removedNodeUrl)