Class ClusterNodeInformation
- java.lang.Object
-
- de.aristaflow.adept2.model.cluster.SimpleClusterNodeInformation
-
- de.aristaflow.adept2.model.cluster.ClusterNodeInformation
-
- All Implemented Interfaces:
Serializable
public class ClusterNodeInformation extends SimpleClusterNodeInformation
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected URI[]
globalRegUris
The URIs of this server cluster node ornull
in case this node is a client or is a server that is currently not running.protected URI[]
interNodeCommUris
The URIs of the service for inter node communication of this cluster node ornull
if the node currently has no inter node communication service, e. g. while restarting.protected long
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 node yet.protected long
retrievalTime
The time this cluster node information has been retrieved.protected long
serverLostCommCount
How often this node has lost communications with the server since the last server update.protected long
sinceLastForeignUpdate
The milliseconds that elapsed since the last update by a different node.protected long
sinceLastOwnUpdate
The 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
Constructors Constructor Description 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.ClusterNodeInformation(String clusterName, String nodeName, String nodeAddress, Status status, long lastOwnUpdate, long sinceLastOwnUpdate, long lastForeignUpdate, long sinceLastForeignUpdate, long runningSince, URI[] globalRegUris, URI[] interNodeCommUris, long serverLostCommCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI[]
getGlobalRegUris()
Gets the URIs of this server cluster node ornull
in case this node is a client or the URIs of the server cannot be retrieved (server is not running).URI[]
getInterNodeCommUris()
Gets the URIs of the service for inter node communication of this cluster node ornull
if the node currently has no inter node communication service, e. g. while restarting.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.long
getRetrievalTime()
Gets the time this cluster node information has been retrieved/created.long
getServerLostCommCount()
Gets how often this node has lost communications with the server since the last server update.long
getSinceLastForeignUpdate()
Gets the time in milliseconds that elapsed since the last update by a different node.long
getSinceLastOwnUpdate()
Gets 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 Detail
-
retrievalTime
protected final long retrievalTime
The time this cluster node information has been retrieved.
-
sinceLastOwnUpdate
protected final long sinceLastOwnUpdate
The milliseconds that elapsed since the last update by the node itself.
-
lastForeignUpdate
protected final long 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 node yet.
-
sinceLastForeignUpdate
protected final long sinceLastForeignUpdate
The milliseconds that elapsed since the last update by a different node. This will beLong.MAX_VALUE
if no different node has updated the node.
-
globalRegUris
protected final URI[] globalRegUris
The URIs of this server cluster node ornull
in case this node is a client or is a server that is currently not running.
-
interNodeCommUris
protected final URI[] interNodeCommUris
The URIs of the service for inter node communication of this cluster node ornull
if the node currently has no inter node communication service, e. g. while restarting.
-
serverLostCommCount
protected final long serverLostCommCount
How often this node has lost communications with the server since the last server update.
-
-
Constructor Detail
-
ClusterNodeInformation
@Deprecated public ClusterNodeInformation(String clusterName, String nodeName, String nodeAddress, Status status, long lastOwnUpdate, long sinceLastOwnUpdate, long lastForeignUpdate, long sinceLastForeignUpdate, long runningSince, URI[] globalRegUris, URI[] interNodeCommUris, long serverLostCommCount)
Deprecated.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 ornull
in case it is not known.status
- The status of this cluster node.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 ornull
in case this node is a client.interNodeCommUris
- The URIs of the service for inter node communication of this cluster node ornull
if 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.
-
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 ornull
in 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 ornull
in case this node is a client.interNodeCommUris
- The URIs of the service for inter node communication of this cluster node ornull
if 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 Detail
-
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_VALUE
if 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_VALUE
if no different node has updated the node.
-
getGlobalRegUris
public URI[] getGlobalRegUris()
Gets the URIs of this server cluster node ornull
in 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
null
in case this node is a client or the URIs of the server cannot be retrieved (server is not running).
-
getInterNodeCommUris
public URI[] getInterNodeCommUris()
Gets the URIs of the service for inter node communication of this cluster node ornull
if 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
null
if 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.
-
-