Class RoundRobinBalancingStrategy
- java.lang.Object
-
- org.infinispan.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
-
- All Implemented Interfaces:
FailoverRequestBalancingStrategy
public class RoundRobinBalancingStrategy extends Object implements FailoverRequestBalancingStrategy
Round-robin implementation forFailoverRequestBalancingStrategy.- Since:
- 14.0
-
-
Constructor Summary
Constructors Constructor Description RoundRobinBalancingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketAddress[]getServers()SocketAddressnextServer(Set<SocketAddress> failedServers)voidsetServers(Collection<SocketAddress> servers)Inform the strategy about the currently alive servers.
-
-
-
Method Detail
-
setServers
public void setServers(Collection<SocketAddress> servers)
Description copied from interface:FailoverRequestBalancingStrategyInform the strategy about the currently alive servers.- Specified by:
setServersin interfaceFailoverRequestBalancingStrategy
-
nextServer
public SocketAddress nextServer(Set<SocketAddress> failedServers)
- Specified by:
nextServerin interfaceFailoverRequestBalancingStrategy- Parameters:
failedServers- Servers that should not be returned (if any other are available)- Returns:
- Address of the next server the request should be routed to.
-
getServers
public SocketAddress[] getServers()
-
-