All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.topology.CacheTopologyHandler Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.topology;

import java.util.concurrent.CompletionStage;

import org.infinispan.statetransfer.StateTransferManager;

/**
 * The link between {@link LocalTopologyManager} and {@link StateTransferManager}.
 *
 * @author Dan Berindei
 * @since 5.2
 */
public interface CacheTopologyHandler {

   /**
    * Invoked when the CH has to be immediately updated because of a leave or when the state transfer has completed
    * and we have to install a permanent CH (pendingCH == null). A state transfer is not always required.
    */
   CompletionStage updateConsistentHash(CacheTopology cacheTopology);

   /**
    * Invoked when state transfer has to be started.
    *
    * The caller will not consider the local rebalance done when this method returns. Instead, the handler
    * will have to call {@link LocalTopologyManager#confirmRebalancePhase(String, int, int, Throwable)}
    */
   CompletionStage rebalance(CacheTopology cacheTopology);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy