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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final URI[]
    The URIs of this server cluster node or null in 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 or null if the node currently has no inter node communication service, e.
    protected final long
    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 final long
    The time this cluster node information has been retrieved.
    protected final long
    How often this node has lost communications with the server since the last server update.
    protected final long
    The milliseconds that elapsed since the last update by a different node.
    protected final long
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    URI[]
    Gets 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).
    URI[]
    Gets 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.
    long
    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
    Gets the time this cluster node information has been retrieved/created.
    long
    Gets how often this node has lost communications with the server since the last server update.
    long
    Gets the time in milliseconds that elapsed since the last update by a different node.
    long
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 be Long.MAX_VALUE if no different node has updated the node.
    • globalRegUris

      protected final URI[] globalRegUris
      The URIs of this server cluster node or null 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 or null 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 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 or null 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 or Long.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 or null in case this node is a client.
      interNodeCommUris - 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.
      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 be Long.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 or null 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 or null 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.