@ThreadSafe public class RoundRobinBalancingStrategy extends Object implements RequestBalancingStrategy
RequestBalancingStrategy
.Constructor and Description |
---|
RoundRobinBalancingStrategy() |
Modifier and Type | Method and Description |
---|---|
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) |
public void setServers(Collection<SocketAddress> servers)
setServers
in interface RequestBalancingStrategy
public SocketAddress nextServer()
nextServer
in interface RequestBalancingStrategy
public SocketAddress dryRunNextServer()
nextServer()
without modifying indexes/state.public SocketAddress[] getServers()
public int getNextPosition()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.