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

org.infinispan.client.hotrod.FailoverRequestBalancingStrategy Maven / Gradle / Ivy

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

import java.net.SocketAddress;
import java.util.Collection;
import java.util.Set;

import net.jcip.annotations.NotThreadSafe;

/**
 * Defines what servers will be selected when a smart-routed request fails.
 */
@NotThreadSafe
public interface FailoverRequestBalancingStrategy {
   /**
    * Inform the strategy about the currently alive servers.
    * @param servers
    */
   void setServers(Collection servers);

   /**
    * @param failedServers
    * @return Address of the next server the request should be routed to.
    */
   SocketAddress nextServer(Set failedServers);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy