Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.topology
Class LocalTopologyManagerImpl

java.lang.Object
  extended by org.infinispan.topology.LocalTopologyManagerImpl
All Implemented Interfaces:
LocalTopologyManager

public class LocalTopologyManagerImpl
extends Object
implements LocalTopologyManager

The LocalTopologyManager implementation.

Since:
5.2
Author:
Dan Berindei

Constructor Summary
LocalTopologyManagerImpl()
           
 
Method Summary
 void confirmRebalance(String cacheName, int topologyId, Throwable throwable)
          Confirm that the local cache cacheName has finished receiving the new data for topology topologyId.
 CacheTopology getCacheTopology(String cacheName)
           
 void handleConsistentHashUpdate(String cacheName, CacheTopology cacheTopology, int viewId)
          Updates the current and/or pending consistent hash, without transferring any state.
 void handleRebalance(String cacheName, CacheTopology cacheTopology, int viewId)
          Performs the state transfer.
 Map<String,Object[]> handleStatusRequest(int viewId)
          Recovers the current topology information for all running caches and returns it to the coordinator.
 void inject(Transport transport, ExecutorService asyncTransportExecutor, GlobalComponentRegistry gcr)
           
 CacheTopology join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm)
          Forwards the join request to the coordinator.
 void leave(String cacheName)
          Forwards the leave request to the coordinator.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTopologyManagerImpl

public LocalTopologyManagerImpl()
Method Detail

inject

public void inject(Transport transport,
                   ExecutorService asyncTransportExecutor,
                   GlobalComponentRegistry gcr)

start

public void start()

stop

public void stop()

join

public CacheTopology join(String cacheName,
                          CacheJoinInfo joinInfo,
                          CacheTopologyHandler stm)
                   throws Exception
Description copied from interface: LocalTopologyManager
Forwards the join request to the coordinator.

Specified by:
join in interface LocalTopologyManager
Returns:
The current consistent hash.
Throws:
Exception

leave

public void leave(String cacheName)
Description copied from interface: LocalTopologyManager
Forwards the leave request to the coordinator.

Specified by:
leave in interface LocalTopologyManager

confirmRebalance

public void confirmRebalance(String cacheName,
                             int topologyId,
                             Throwable throwable)
Description copied from interface: LocalTopologyManager
Confirm that the local cache cacheName has finished receiving the new data for topology topologyId.

The coordinator can change during the state transfer, so we make the rebalance RPC async and we send the response as a different command.

Specified by:
confirmRebalance in interface LocalTopologyManager
throwable - null if local rebalance ended because of an error.

handleStatusRequest

public Map<String,Object[]> handleStatusRequest(int viewId)
Description copied from interface: LocalTopologyManager
Recovers the current topology information for all running caches and returns it to the coordinator.

Specified by:
handleStatusRequest in interface LocalTopologyManager

handleConsistentHashUpdate

public void handleConsistentHashUpdate(String cacheName,
                                       CacheTopology cacheTopology,
                                       int viewId)
                                throws InterruptedException
Description copied from interface: LocalTopologyManager
Updates the current and/or pending consistent hash, without transferring any state.

Specified by:
handleConsistentHashUpdate in interface LocalTopologyManager
Throws:
InterruptedException

handleRebalance

public void handleRebalance(String cacheName,
                            CacheTopology cacheTopology,
                            int viewId)
                     throws InterruptedException
Description copied from interface: LocalTopologyManager
Performs the state transfer.

Specified by:
handleRebalance in interface LocalTopologyManager
Throws:
InterruptedException

getCacheTopology

public CacheTopology getCacheTopology(String cacheName)
Specified by:
getCacheTopology in interface LocalTopologyManager
Returns:
the current topology for a cache.

Infinispan Distribution 5.2.6.Final-redhat-2

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