Class ClusterNode

    • Constructor Summary

      Constructors 
      Constructor Description
      ClusterNode()
      Instantiates a new Cluster node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getCpuLoad()
      Retrieves the cpu load.
      String getInternalHostAddress()
      Retrieves the internal host address which uses the HTTP/HTTPS protocol for communications between clients and the context server.
      double[] getLoadAverage()
      Retrieves the load average for the last minute, five minutes and fifteen minutes.
      String getPublicHostAddress()
      Retrieves the public host address.
      long getUptime()
      Retrieves the uptime.
      boolean isData()
      Determines whether this ClusterNode locally stores data.
      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.
      void setCpuLoad​(double cpuLoad)
      Sets the cpu load.
      void setData​(boolean data)
      Specifies whether this ClusterNode locally stores data.
      void setInternalHostAddress​(String internalHostAddress)
      Sets the internal host address which uses the HTTP/HTTPS protocol for communications between clients and the context server.
      void setLoadAverage​(double[] loadAverage)
      Sets the load average for the last minute, five minutes and fifteen minutes.
      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..
      void setPublicHostAddress​(String publicHostAddress)
      Sets the public host address.
      void setUptime​(long uptime)
      Sets the uptime.
    • Constructor Detail

      • ClusterNode

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

      • 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