org.xmlBlaster.util.cluster
Class NodeId
java.lang.Object
org.xmlBlaster.util.cluster.NodeId
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public final class NodeId
- extends java.lang.Object
- implements java.lang.Comparable, java.io.Serializable
Holds the unique name of an xmlBlaster server instance (= cluster node)
- Since:
- 0.79e
- Author:
- xmlBlaster@marcelruff.info
- See Also:
- cluster requirement,
Serialized Form
Constructor Summary |
NodeId(java.lang.String id)
|
Method Summary |
int |
compareTo(java.lang.Object obj)
Needed for use in TreeSet and TreeMap, enforced by java.lang.Comparable |
boolean |
equals(NodeId n)
|
java.lang.String |
getId()
|
void |
setId(java.lang.String id)
You need to pass a valid node name without any special characters,
e.g. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NodeId
public NodeId(java.lang.String id)
- See Also:
setId(String)
getId
public final java.lang.String getId()
- Returns:
- e.g. "heron" (/node/heron/... is stripped)
setId
public final void setId(java.lang.String id)
- You need to pass a valid node name without any special characters,
e.g. "http://xy.com:3412" is not allowed as it contains '/' and ':' chars.
- Parameters:
id
- The cluster node id, e.g. "heron".
If you pass "/node/heron/client/joe" everything is stripped to get "heron"- See Also:
Global.getStrippedId()
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
getId()
compareTo
public final int compareTo(java.lang.Object obj)
- Needed for use in TreeSet and TreeMap, enforced by java.lang.Comparable
- Specified by:
compareTo
in interface java.lang.Comparable
equals
public final boolean equals(NodeId n)
Copyright © 1999-2014 The xmlBlaster.org contributers.