Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.topology
Interface RebalancePolicy

All Known Implementing Classes:
DefaultRebalancePolicy

public interface RebalancePolicy

Processes cache membership changes or any other events and decides when to rebalance state between members. It is used both in distributed and replicated mode. Implementations can trigger a rebalance using ClusterTopologyManager.triggerRebalance(String). They don't control the resulting consistent hash directly, but they can use the ClusterCacheStatus to access the cache's custom ConsistentHashFactory implementation and influence the generated consistent hash indirectly.

Since:
5.2
Author:
Dan Berindei

Method Summary
 void initCache(String cacheName, ClusterCacheStatus cacheStatus)
          Initialize the policy for a cache, without a list of members.
 void updateCacheStatus(String cacheName, ClusterCacheStatus cacheStatus)
          Called when the status of a cache changes.
 

Method Detail

initCache

void initCache(String cacheName,
               ClusterCacheStatus cacheStatus)
               throws Exception
Initialize the policy for a cache, without a list of members. It won't have any effect if the cache is already initialized.

Throws:
Exception

updateCacheStatus

void updateCacheStatus(String cacheName,
                       ClusterCacheStatus cacheStatus)
                       throws Exception
Called when the status of a cache changes. It could be a node joining or leaving, or a merge, or a

Throws:
Exception

Infinispan Distribution 5.2.6.Final-redhat-2

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