Commit 255c4244 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added nodeID.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8293 b35dd754-fafc-0310-a699-88a17e54d16e
parent ba02635b
......@@ -97,6 +97,7 @@ public class XMPPServer {
private Date startDate;
private Date stopDate;
private boolean initialized = false;
private byte[] nodeID;
/**
* All modules loaded by this server
......@@ -194,6 +195,28 @@ public class XMPPServer {
return false;
}
/**
* Returns an ID that uniquely identifies this server in a cluster. When not running in cluster mode
* the returned value is always the same. However, when in cluster mode the value should be set
* when joining the cluster and must be unique even upon restarts of this node.
*
* @return an ID that uniquely identifies this server in a cluster.
*/
public byte[] getNodeID() {
return nodeID == null ? new byte[] {1} : nodeID;
}
/**
* Sets an ID that uniquely identifies this server in a cluster. When not running in cluster mode
* the returned value is always the same. However, when in cluster mode the value should be set
* when joining the cluster and must be unique even upon restarts of this node.
*
* @param nodeID an ID that uniquely identifies this server in a cluster or null if not in a cluster.
*/
public void setNodeID(byte[] nodeID) {
this.nodeID = nodeID;
}
/**
* Returns true if the given address matches a component service JID.
*
......@@ -286,7 +309,7 @@ public class XMPPServer {
name = JiveGlobals.getProperty("xmpp.domain", "127.0.0.1").toLowerCase();
version = new Version(3, 3, 1, Version.ReleaseStatus.Release, 1);
version = new Version(3, 4, 0, Version.ReleaseStatus.Alpha, 1);
if ("true".equals(JiveGlobals.getXMLProperty("setup"))) {
setupMode = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment