Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.topology
Class ClusterTopologyManagerImpl

java.lang.Object
  extended by org.infinispan.topology.ClusterTopologyManagerImpl
All Implemented Interfaces:
ClusterTopologyManager

public class ClusterTopologyManagerImpl
extends Object
implements ClusterTopologyManager

The ClusterTopologyManager implementation.

Since:
5.2
Author:
Dan Berindei

Nested Class Summary
 class ClusterTopologyManagerImpl.ClusterViewListener
           
 
Constructor Summary
ClusterTopologyManagerImpl()
           
 
Method Summary
 CacheTopology handleJoin(String cacheName, Address joiner, CacheJoinInfo joinInfo, int viewId)
          Updates the members list and notifies the RebalancePolicy.
 void handleLeave(String cacheName, Address leaver, int viewId)
          Updates the members list and notifies the RebalancePolicy
protected  void handleNewView(List<Address> newMembers, boolean mergeView, int newViewId)
           
 void handleRebalanceCompleted(String cacheName, Address node, int topologyId, Throwable throwable, int viewId)
          Marks the rebalance as complete on the sender.
 void inject(Transport transport, RebalancePolicy rebalancePolicy, ExecutorService asyncTransportExecutor, GlobalConfiguration globalConfiguration, GlobalComponentRegistry gcr, CacheManagerNotifier cacheManagerNotifier)
           
 void start()
           
 void stop()
           
 void triggerRebalance(String cacheName)
          Used by RebalancePolicy to start a state transfer.
 void updateCacheStatusAfterMerge(String cacheName, List<Address> clusterMembers, List<CacheTopology> partitionTopologies)
           
 void updateClusterMembers(List<Address> newClusterMembers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterTopologyManagerImpl

public ClusterTopologyManagerImpl()
Method Detail

inject

public void inject(Transport transport,
                   RebalancePolicy rebalancePolicy,
                   ExecutorService asyncTransportExecutor,
                   GlobalConfiguration globalConfiguration,
                   GlobalComponentRegistry gcr,
                   CacheManagerNotifier cacheManagerNotifier)

start

public void start()

stop

public void stop()

triggerRebalance

public void triggerRebalance(String cacheName)
                      throws Exception
Description copied from interface: ClusterTopologyManager
Used by RebalancePolicy to start a state transfer.

Specified by:
triggerRebalance in interface ClusterTopologyManager
Throws:
Exception

handleJoin

public CacheTopology handleJoin(String cacheName,
                                Address joiner,
                                CacheJoinInfo joinInfo,
                                int viewId)
                         throws Exception
Description copied from interface: ClusterTopologyManager
Updates the members list and notifies the RebalancePolicy.

Specified by:
handleJoin in interface ClusterTopologyManager
Returns:
The current consistent hash.
Throws:
Exception

handleLeave

public void handleLeave(String cacheName,
                        Address leaver,
                        int viewId)
                 throws Exception
Description copied from interface: ClusterTopologyManager
Updates the members list and notifies the RebalancePolicy

Specified by:
handleLeave in interface ClusterTopologyManager
Throws:
Exception

handleRebalanceCompleted

public void handleRebalanceCompleted(String cacheName,
                                     Address node,
                                     int topologyId,
                                     Throwable throwable,
                                     int viewId)
                              throws Exception
Description copied from interface: ClusterTopologyManager
Marks the rebalance as complete on the sender.

Specified by:
handleRebalanceCompleted in interface ClusterTopologyManager
Throws:
Exception

handleNewView

protected void handleNewView(List<Address> newMembers,
                             boolean mergeView,
                             int newViewId)

updateCacheStatusAfterMerge

public void updateCacheStatusAfterMerge(String cacheName,
                                        List<Address> clusterMembers,
                                        List<CacheTopology> partitionTopologies)
                                 throws Exception
Throws:
Exception

updateClusterMembers

public void updateClusterMembers(List<Address> newClusterMembers)
                          throws Exception
Throws:
Exception

Infinispan Distribution 5.2.6.Final-redhat-2

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