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, shouldReconnectpublic int selectNextDestinationIndex(int previousDestinationIndex,
int numDestinations)
DestinationConnectionStrategypreviousDestinationIndex - 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 © 2019. All rights reserved.