org.infinispan.client.hotrod.impl.transport.tcp
Class RoundRobinBalancingStrategy

java.lang.Object
  extended by 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

Constructor Summary
RoundRobinBalancingStrategy()
           
 
Method Summary
 SocketAddress dryRunNextServer()
          Returns same value as nextServer() without modifying indexes/state.
 int getNextPosition()
           
 SocketAddress[] getServers()
           
 SocketAddress nextServer()
          Multiple threads might call this method at the same time.
 void setServers(Collection<SocketAddress> servers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRobinBalancingStrategy

public RoundRobinBalancingStrategy()
Method Detail

setServers

public void setServers(Collection<SocketAddress> servers)
Specified by:
setServers in interface RequestBalancingStrategy

nextServer

public SocketAddress nextServer()
Multiple threads might call this method at the same time.

Specified by:
nextServer in interface RequestBalancingStrategy

dryRunNextServer

public SocketAddress dryRunNextServer()
Returns same value as nextServer() without modifying indexes/state.


getServers

public SocketAddress[] getServers()

getNextPosition

public int getNextPosition()

-->

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