Class Node
java.lang.Object
org.exoplatform.ws.frameworks.cometd.loadbalancer.Node
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new connection.voidRemove connection.intgetId()intgetUrl()booleanisAlive()voidsetAlive(boolean alive) voidsetConnected(int connected) voidvoidsetMaxConnection(int maxConnenction) void
-
Constructor Details
-
Node
- Parameters:
id- the unique id of node.url- the base URL of node.maxConenction- the max count of allowed connection.
-
Node
- Parameters:
id- the unique id of node.url- the base URL of node.
-
Node
public Node()Default constructor.
-
-
Method Details
-
getUrl
- Returns:
- the URL of node in cluster.
-
setUrl
- 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
- Returns:
- the id
-
setId
- Parameters:
id- the id to set
-