Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.topology
Interface LocalTopologyManager

All Known Implementing Classes:
LocalTopologyManagerImpl

public interface LocalTopologyManager

Runs on every node and handles the communication with the ClusterTopologyManager.

Since:
5.2
Author:
Dan Berindei

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.
 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.
 

Method Detail

join

CacheTopology join(String cacheName,
                   CacheJoinInfo joinInfo,
                   CacheTopologyHandler stm)
                   throws Exception
Forwards the join request to the coordinator.

Returns:
The current consistent hash.
Throws:
Exception

leave

void leave(String cacheName)
Forwards the leave request to the coordinator.


confirmRebalance

void confirmRebalance(String cacheName,
                      int topologyId,
                      Throwable throwable)
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.

Parameters:
throwable - null if local rebalance ended because of an error.

handleStatusRequest

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

Parameters:
viewId -

handleConsistentHashUpdate

void handleConsistentHashUpdate(String cacheName,
                                CacheTopology cacheTopology,
                                int viewId)
                                throws InterruptedException
Updates the current and/or pending consistent hash, without transferring any state.

Throws:
InterruptedException

handleRebalance

void handleRebalance(String cacheName,
                     CacheTopology cacheTopology,
                     int viewId)
                     throws InterruptedException
Performs the state transfer.

Throws:
InterruptedException

getCacheTopology

CacheTopology getCacheTopology(String cacheName)
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.