org.infinispan.client.hotrod.impl.transport.tcp
Class RoundRobinBalancingStrategy
java.lang.Object
org.infinispan.client.hotrod.impl.transport.tcp.RoundRobinBalancingStrategy
- All Implemented Interfaces:
- RequestBalancingStrategy
@ThreadSafe
public class RoundRobinBalancingStrategy
- extends Object
- implements RequestBalancingStrategy
Round-robin implementation for RequestBalancingStrategy
.
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinBalancingStrategy
public RoundRobinBalancingStrategy()
setServers
public void setServers(Collection<InetSocketAddress> servers)
- Specified by:
setServers
in interface RequestBalancingStrategy
nextServer
public InetSocketAddress nextServer()
- Multiple threads might call this method at the same time.
- Specified by:
nextServer
in interface RequestBalancingStrategy
dryRunNextServer
public InetSocketAddress dryRunNextServer()
- Returns same value as
nextServer()
without modifying indexes/state.
getServers
public InetSocketAddress[] getServers()
getNextPosition
public int getNextPosition()
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.