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
 InetSocketAddress dryRunNextServer()
          Returns same value as nextServer() without modifying indexes/state.
 int getNextPosition()
           
 InetSocketAddress[] getServers()
           
 InetSocketAddress nextServer()
          Multiple threads might call this method at the same time.
 void setServers(Collection<InetSocketAddress> 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<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()

Google Analytics

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