Class ClusterNodeInformation
java.lang.Object
de.aristaflow.adept2.model.cluster.SimpleClusterNodeInformation
de.aristaflow.adept2.model.cluster.ClusterNodeInformation
- All Implemented Interfaces:
Serializable
This class provides all information concerning a cluster node. This may
either be a server or a client node, which is, the
global registry URIs are set or not.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final URI[]The URIs of this server cluster node ornullin case this node is a client or is a server that is currently not running.protected final URI[]The URIs of the service for inter node communication of this cluster node ornullif the node currently has no inter node communication service, e.protected final longThe last time the status of this cluster has been updated by a different node or -1 if the cluster node has not been updated by a different node yet.protected final longThe time this cluster node information has been retrieved.protected final longHow often this node has lost communications with the server since the last server update.protected final longThe milliseconds that elapsed since the last update by a different node.protected final longThe milliseconds that elapsed since the last update by the node itself.Fields inherited from class de.aristaflow.adept2.model.cluster.SimpleClusterNodeInformation
clusterName, lastOwnUpdate, nodeAddress, nodeName, runningSince, status -
Constructor Summary
ConstructorsConstructorDescriptionClusterNodeInformation(String clusterName, String nodeName, String nodeAddress, Status status, long retrievalTime, long lastOwnUpdate, long sinceLastOwnUpdate, long lastForeignUpdate, long sinceLastForeignUpdate, long runningSince, URI[] globalRegUris, URI[] interNodeCommUris, long serverLostCommCount) Creates information for a specific cluster node. -
Method Summary
Modifier and TypeMethodDescriptionURI[]Gets the URIs of this server cluster node ornullin case this node is a client or the URIs of the server cannot be retrieved (server is not running).URI[]Gets the URIs of the service for inter node communication of this cluster node ornullif the node currently has no inter node communication service, e.longGets the last time the status of this cluster has been updated by a different node or -1 if the cluster node has not been updated by a different node yet.longGets the time this cluster node information has been retrieved/created.longGets how often this node has lost communications with the server since the last server update.longGets the time in milliseconds that elapsed since the last update by a different node.longGets the time in milliseconds that elapsed since the last update by the node itself.Methods inherited from class de.aristaflow.adept2.model.cluster.SimpleClusterNodeInformation
getClusterName, getLastOwnUpdate, getNodeAddress, getNodeName, getRunningSince, getStatus
-
Field Details
-
retrievalTime
protected final long retrievalTimeThe time this cluster node information has been retrieved. -
sinceLastOwnUpdate
protected final long sinceLastOwnUpdateThe milliseconds that elapsed since the last update by the node itself. -
lastForeignUpdate
protected final long lastForeignUpdateThe last time the status of this cluster has been updated by a different node or -1 if the cluster node has not been updated by a different node yet. -
sinceLastForeignUpdate
protected final long sinceLastForeignUpdateThe milliseconds that elapsed since the last update by a different node. This will beLong.MAX_VALUEif no different node has updated the node. -
globalRegUris
The URIs of this server cluster node ornullin case this node is a client or is a server that is currently not running. -
interNodeCommUris
The URIs of the service for inter node communication of this cluster node ornullif the node currently has no inter node communication service, e. g. while restarting. -
serverLostCommCount
protected final long serverLostCommCountHow often this node has lost communications with the server since the last server update.
-
-
Constructor Details
-
ClusterNodeInformation
public ClusterNodeInformation(String clusterName, String nodeName, String nodeAddress, Status status, long retrievalTime, long lastOwnUpdate, long sinceLastOwnUpdate, long lastForeignUpdate, long sinceLastForeignUpdate, long runningSince, URI[] globalRegUris, URI[] interNodeCommUris, long serverLostCommCount) Creates information for a specific cluster node.- Parameters:
clusterName- The name of this cluster.nodeName- The name of this cluster node.nodeAddress- The address of this cluster node ornullin case it is not known.status- The status of this cluster node.retrievalTime- The time this cluster node information has been retrieved/created.lastOwnUpdate- The last time the status of this cluster has been updated by the node itself or -1 if the cluster node has not been updated yet.sinceLastOwnUpdate- The milliseconds that elapsed since the last update by the node itself.lastForeignUpdate- The last time the status of this cluster has been updated by a different node or -1 if the cluster node has not been updated by a different yet.sinceLastForeignUpdate- The milliseconds that elapsed since the last update by a different node orLong.MAX_VALUE.runningSince- The time since when this cluster node is running or -1 if the cluster node is not running yet.globalRegUris- The URIs of this server cluster node ornullin case this node is a client.interNodeCommUris- The URIs of the service for inter node communication of this cluster node ornullif the node currently has no inter node communication service, e. g. while restarting.serverLostCommCount- How often this node has lost communications with the server since the last server update.
-
-
Method Details
-
getRetrievalTime
public long getRetrievalTime()Gets the time this cluster node information has been retrieved/created.- Returns:
- The time this cluster node information has been retrieved/created.
-
getSinceLastOwnUpdate
public long getSinceLastOwnUpdate()Gets the time in milliseconds that elapsed since the last update by the node itself.- Returns:
- The time in milliseconds that elapsed since the last update by the node itself.
-
getLastForeignUpdate
public long getLastForeignUpdate()Gets the last time the status of this cluster has been updated by a different node or -1 if the cluster node has not been updated by a different node yet.- Returns:
- The last time the status of this cluster has been updated by a different node node itself or -1 if the cluster node has not been updated by a different node yet.
-
getSinceLastForeignUpdate
public long getSinceLastForeignUpdate()Gets the time in milliseconds that elapsed since the last update by a different node. This will beLong.MAX_VALUEif no different node has updated the node.- Returns:
- The time in milliseconds that elapsed since the last update by a
different node. This will be
Long.MAX_VALUEif no different node has updated the node.
-
getGlobalRegUris
Gets the URIs of this server cluster node ornullin case this node is a client or the URIs of the server cannot be retrieved (server is not running).- Returns:
- The URIs of this server cluster node or
nullin case this node is a client or the URIs of the server cannot be retrieved (server is not running).
-
getInterNodeCommUris
Gets the URIs of the service for inter node communication of this cluster node ornullif the node currently has no inter node communication service, e. g. while restarting.- Returns:
- The URIs of the service for inter node communication of this
cluster node or
nullif the node currently has no inter node communication service, e. g. while restarting.
-
getServerLostCommCount
public long getServerLostCommCount()Gets how often this node has lost communications with the server since the last server update.- Returns:
- How often this node has lost communications with the server since the last server update.
-