Commit 51751317 authored by Pete Matern's avatar Pete Matern Committed by pete

More work on ClusterListener - core logic is there, but much testing needed to...

More work on ClusterListener - core logic is there, but much testing needed to verify some assumptions about coherence behavior.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8316 b35dd754-fafc-0310-a699-88a17e54d16e
parent fb304224
......@@ -98,6 +98,7 @@ public class XMPPServer {
private Date stopDate;
private boolean initialized = false;
private byte[] nodeID;
private static final byte[] DEFAULT_NODE_ID = new byte[0];
/**
* All modules loaded by this server
......@@ -203,7 +204,7 @@ public class XMPPServer {
* @return an ID that uniquely identifies this server in a cluster.
*/
public byte[] getNodeID() {
return nodeID == null ? new byte[] {1} : nodeID;
return nodeID == null ? DEFAULT_NODE_ID : nodeID;
}
/**
......
......@@ -35,6 +35,15 @@ public class ClientRoute implements Cacheable, Externalizable {
}
public byte[] getNodeID() {
return nodeID;
}
public boolean isAvailable() {
return available;
}
public ClientRoute(byte[] nodeID, boolean available) {
this.nodeID = nodeID;
this.available = available;
......
......@@ -27,6 +27,7 @@ public class DefaultLocalCacheStrategy implements CacheFactoryStrategy {
public static final int DEFAULT_MAX_CACHE_SIZE = 1024 * 256;
public static final long DEFAULT_MAX_CACHE_LIFETIME = 6 * JiveConstants.HOUR;
private static final byte[] EMPTY_ID = new byte[0];
/**
* This map contains property names which were used to store cache configuration data
......@@ -127,7 +128,7 @@ public class DefaultLocalCacheStrategy implements CacheFactoryStrategy {
}
public byte[] getClusterMemberID() {
return null;
return new byte[0];
}
public void doClusterTask(final ClusterTask task) {
......
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