Class Node


  • public class Node
    extends Object
    Created by The eXo Platform SAS.
    Version:
    $Id: $
    Author:
    Vitaly Parfonov
    • Constructor Detail

      • Node

        public Node​(String id,
                    String url,
                    int maxConenction)
        Parameters:
        id - the unique id of node.
        url - the base URL of node.
        maxConenction - the max count of allowed connection.
      • Node

        public Node​(String id,
                    String url)
        Parameters:
        id - the unique id of node.
        url - the base URL of node.
      • Node

        public Node()
        Default constructor.
    • Method Detail

      • getUrl

        public String getUrl()
        Returns:
        the URL of node in cluster.
      • setUrl

        public void setUrl​(String url)
        Parameters:
        url - the URL to set.
      • getMaxConnection

        public int getMaxConnection()
        Returns:
        the max allowed connection on this node.
      • setMaxConnection

        public void setMaxConnection​(int maxConnenction)
        Parameters:
        maxConnenction - set max allowed connection on this node.
      • setConnected

        public void setConnected​(int connected)
        Parameters:
        connected - set how much already connected.
      • getConnected

        public int getConnected()
        Returns:
        how much already connected to this node.
      • isAlive

        public boolean isAlive()
        Returns:
        the alive
      • setAlive

        public void setAlive​(boolean alive)
        Parameters:
        alive - the alive to set
      • addConnection

        public void addConnection()
        Add new connection.
      • delConnection

        public void delConnection()
        Remove connection.
      • getId

        public String getId()
        Returns:
        the id
      • setId

        public void setId​(String id)
        Parameters:
        id - the id to set