public class RoundRobinDestinationConnectionStrategy extends DestinationConnectionStrategyWithTtl
Constructor and Description |
---|
RoundRobinDestinationConnectionStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
selectNextDestinationIndex(int previousDestinationIndex,
int numDestinations)
Returns the index of the destination to which to connect next.
|
connectFailed, connectSuccess, getConnectionTTL, setConnectionTTL, shouldReconnect
public RoundRobinDestinationConnectionStrategy()
public int selectNextDestinationIndex(int previousDestinationIndex, int numDestinations)
DestinationConnectionStrategy
previousDestinationIndex
- The previous destination index to which a connection was attempted (either success or failure)numDestinations
- The total number of destinations available.Copyright © 2020. All rights reserved.