use of org.jivesoftware.openfire.plugin.util.cluster.HazelcastClusterNodeInfo in project Openfire by igniterealtime.
the class ClusteredCacheFactory method getClusterNodeInfo.
public ClusterNodeInfo getClusterNodeInfo(byte[] nodeID) {
if (cluster == null) {
return null;
}
ClusterNodeInfo result = null;
Member member = getMember(nodeID);
if (member != null) {
result = new HazelcastClusterNodeInfo(member, cluster.getClusterTime());
}
return result;
}
use of org.jivesoftware.openfire.plugin.util.cluster.HazelcastClusterNodeInfo in project Openfire by igniterealtime.
the class ClusterListener method memberAdded.
public void memberAdded(MembershipEvent event) {
// local member only
if (event.getMember().localMember()) {
// We left and re-joined the cluster
joinCluster();
} else {
nodePresences.put(NodeID.getInstance(StringUtils.getBytes(event.getMember().getUuid())), new ConcurrentHashMap<String, Collection<String>>());
// Trigger event that a new node has joined the cluster
ClusterManager.fireJoinedCluster(StringUtils.getBytes(event.getMember().getUuid()), true);
}
clusterNodesInfo.put(event.getMember().getUuid(), new HazelcastClusterNodeInfo(event.getMember(), cluster.getClusterTime()));
}
use of org.jivesoftware.openfire.plugin.util.cluster.HazelcastClusterNodeInfo in project Openfire by igniterealtime.
the class ClusterListener method memberAttributeChanged.
@Override
public void memberAttributeChanged(MemberAttributeEvent event) {
ClusterNodeInfo priorNodeInfo = clusterNodesInfo.get(event.getMember().getUuid());
clusterNodesInfo.put(event.getMember().getUuid(), new HazelcastClusterNodeInfo(event.getMember(), priorNodeInfo.getJoinedTime()));
}
Aggregations