Class ClusterNode

java.lang.Object
org.apache.unomi.api.Item
org.apache.unomi.api.ClusterNode
All Implemented Interfaces:
Serializable

public class ClusterNode extends Item
Information about a cluster node.
See Also:
  • Field Details

  • Constructor Details

    • ClusterNode

      public ClusterNode()
      Instantiates a new Cluster node.
  • Method Details

    • getCpuLoad

      public double getCpuLoad()
      Retrieves the cpu load.
      Returns:
      the cpu load
    • setCpuLoad

      public void setCpuLoad(double cpuLoad)
      Sets the cpu load.
      Parameters:
      cpuLoad - the cpu load
    • getPublicHostAddress

      public String getPublicHostAddress()
      Retrieves the public host address.
      Returns:
      the public host address
    • setPublicHostAddress

      public void setPublicHostAddress(String publicHostAddress)
      Sets the public host address.
      Parameters:
      publicHostAddress - the public host address
    • getInternalHostAddress

      public String getInternalHostAddress()
      Retrieves the internal host address which uses the HTTP/HTTPS protocol for communications between clients and the context server.
      Returns:
      the internal host address
    • setInternalHostAddress

      public void setInternalHostAddress(String internalHostAddress)
      Sets the internal host address which uses the HTTP/HTTPS protocol for communications between clients and the context server.
      Parameters:
      internalHostAddress - the internal host address
    • getLoadAverage

      public double[] getLoadAverage()
      Retrieves the load average for the last minute, five minutes and fifteen minutes.
      Returns:
      an array of double containing, in order and starting from index 0, the load average for the last minute, last five minutes and last fifteen minutes
    • setLoadAverage

      public void setLoadAverage(double[] loadAverage)
      Sets the load average for the last minute, five minutes and fifteen minutes.
      Parameters:
      loadAverage - an array of double containing, in order and starting from index 0, the load average for the last minute, last five minutes and last fifteen minutes
    • getUptime

      public long getUptime()
      Retrieves the uptime.
      Returns:
      the uptime
    • setUptime

      public void setUptime(long uptime)
      Sets the uptime.
      Parameters:
      uptime - the uptime
    • isMaster

      public boolean isMaster()
      Determines whether this ClusterNode is a master node, i.e. this node doesn't store any data but is only focused on cluster management operations.
      Returns:
      true if this node is a master node, false otherwise
    • setMaster

      public void setMaster(boolean master)
      Specifies whether this ClusterNode is a master node, i.e. this node doesn't store any data but is only focused on cluster management operations..
      Parameters:
      master - true if this node is a master node, false otherwise
    • isData

      public boolean isData()
      Determines whether this ClusterNode locally stores data.
      Returns:
      true if this node locally stores data, false otherwise
    • setData

      public void setData(boolean data)
      Specifies whether this ClusterNode locally stores data.
      Parameters:
      data - true if this node locally stores data, false otherwise
    • getStartTime

      public long getStartTime()
      Retrieves the node start time in milliseconds.
      Returns:
      the start time
    • setStartTime

      public void setStartTime(long startTime)
      Sets the node start time in milliseconds.
      Parameters:
      startTime - the start time
    • getLastHeartbeat

      public long getLastHeartbeat()
      Retrieves the last heartbeat time in milliseconds.
      Returns:
      the last heartbeat time
    • setLastHeartbeat

      public void setLastHeartbeat(long lastHeartbeat)
      Sets the last heartbeat time in milliseconds.
      Parameters:
      lastHeartbeat - the last heartbeat time
    • getServerInfo

      public ServerInfo getServerInfo()
      Gets the server information.
      Returns:
      the server information
    • setServerInfo

      public void setServerInfo(ServerInfo serverInfo)
      Sets the server information.
      Parameters:
      serverInfo - the server information