Commit ba02635b authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Modified getClusterMemberID to return byte[] (based on UID) or null if not in a cluster.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8292 b35dd754-fafc-0310-a699-88a17e54d16e
parent 756c2e8a
......@@ -131,11 +131,12 @@ public class CacheFactory {
}
/**
* Returns a string uniquely identifying this member of the cluster.
* Returns a byte[] that uniquely identifies this member within the cluster or <tt>null</tt>
* when not in a cluster.
*
* @return a string uniquely identifying this member of the cluster.
* @return a byte[] that uniquely identifies this member within the cluster or null when not in a cluster.
*/
public static String getClusterMemberID() {
public static byte[] getClusterMemberID() {
return cacheFactoryStrategy.getClusterMemberID();
}
......
......@@ -53,11 +53,12 @@ public interface CacheFactoryStrategy {
boolean isSeniorClusterMember();
/**
* Returns a string uniquely identifying this member within the cluster.
* Returns a byte[] that uniquely identifies this member within the cluster or <tt>null</tt>
* when not in a cluster.
*
* @return a string uniquely identifying this member within the cluster.
* @return a byte[] that uniquely identifies this member within the cluster or null when not in a cluster.
*/
String getClusterMemberID();
byte[] getClusterMemberID();
/**
* Invokes a task on other cluster members in an asynchronous fashion. The task will not be
......
......@@ -7,14 +7,14 @@
*/
package org.jivesoftware.util.cache;
import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveConstants;
import java.util.Collection;
import java.util.Map;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* CacheFactoryStrategy for use in Openfire. It creates and manages local caches, and it's cluster
......@@ -77,8 +77,8 @@ public class DefaultLocalCacheStrategy implements CacheFactoryStrategy {
return true;
}
public String getClusterMemberID() {
return "";
public byte[] getClusterMemberID() {
return null;
}
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