public class RandomDestinationConnectionStrategy extends DestinationConnectionStrategyWithTtl
Constructor and Description |
---|
RandomDestinationConnectionStrategy() |
Modifier and Type | Method and Description |
---|---|
Random |
getRandom() |
int |
selectNextDestinationIndex(int previousDestinationIndex,
int numDestinations)
Returns the index of the destination to which to connect next.
|
connectFailed, connectSuccess, getConnectionTTL, setConnectionTTL, shouldReconnect
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.public Random getRandom()
Copyright © 2020. All rights reserved.