Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.topology
Class ClusterCacheStatus

java.lang.Object
  extended by org.infinispan.topology.ClusterCacheStatus

public class ClusterCacheStatus
extends Object

Keeps track of a cache's status: members, current/pending consistent hashes, and rebalance status

Since:
5.2
Author:
Dan Berindei

Constructor Summary
ClusterCacheStatus(String cacheName, CacheJoinInfo joinInfo)
           
 
Method Summary
 boolean addMember(Address joiner)
           
 boolean confirmRebalanceOnNode(Address member, int receivedTopologyId)
           
 void endRebalance()
           
 CacheTopology getCacheTopology()
           
 List<Address> getJoiners()
           
 CacheJoinInfo getJoinInfo()
           
 List<Address> getMembers()
           
 boolean hasJoiners()
           
 boolean hasMembers()
           
 boolean isRebalanceInProgress()
           
 boolean needConsistentHashUpdate()
           
 List<Address> pruneInvalidMembers(List<Address> possibleMembers)
           
 boolean removeMember(Address leaver)
           
 void setMembers(List<Address> newMembers)
           
 boolean startRebalance(CacheTopology newTopology)
           
 String toString()
           
 void updateCacheTopology(CacheTopology newTopology)
           
 boolean updateClusterMembers(List<Address> newClusterMembers)
           
 boolean updateRebalanceMembersList()
          Should be called after the members list was updated in any other way (removeMember(Address), updateClusterMembers(java.util.List) etc.)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusterCacheStatus

public ClusterCacheStatus(String cacheName,
                          CacheJoinInfo joinInfo)
Method Detail

getJoinInfo

public CacheJoinInfo getJoinInfo()

getMembers

public List<Address> getMembers()

hasMembers

public boolean hasMembers()

getJoiners

public List<Address> getJoiners()

hasJoiners

public boolean hasJoiners()

setMembers

public void setMembers(List<Address> newMembers)

addMember

public boolean addMember(Address joiner)
Returns:
true if the joiner was not already a member, false otherwise

removeMember

public boolean removeMember(Address leaver)
Returns:
true if the leaver was a member, false otherwise

updateClusterMembers

public boolean updateClusterMembers(List<Address> newClusterMembers)
Returns:
true if the members list has changed, false otherwise

getCacheTopology

public CacheTopology getCacheTopology()

updateCacheTopology

public void updateCacheTopology(CacheTopology newTopology)

needConsistentHashUpdate

public boolean needConsistentHashUpdate()

pruneInvalidMembers

public List<Address> pruneInvalidMembers(List<Address> possibleMembers)

isRebalanceInProgress

public boolean isRebalanceInProgress()

startRebalance

public boolean startRebalance(CacheTopology newTopology)
Returns:
true if a rebalance was started, false if a rebalance was already in progress

confirmRebalanceOnNode

public boolean confirmRebalanceOnNode(Address member,
                                      int receivedTopologyId)
Returns:
true if this was the last confirmation needed, false if more confirmations are needed or if the rebalance was already confirmed in another way (e.g. members list update)

updateRebalanceMembersList

public boolean updateRebalanceMembersList()
Should be called after the members list was updated in any other way (removeMember(Address), updateClusterMembers(java.util.List) etc.)

Returns:
true if the rebalance was confirmed with this update, false if more confirmations are needed or if the rebalance was already confirmed in another way (e.g. the last member confirmed)

endRebalance

public void endRebalance()

toString

public String toString()
Overrides:
toString in class Object

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.