public class FixedIntervalReconnectStrategy extends Object implements ReconnectStrategy
| Constructor and Description |
|---|
FixedIntervalReconnectStrategy(long interval)
Create a new
FixedIntervalReconnectStrategy instance. |
| Modifier and Type | Method and Description |
|---|---|
Long |
getTimeToNextAttempt(int attemptCount)
Return the time to the next attempt to reconnect.
|
public FixedIntervalReconnectStrategy(long interval)
FixedIntervalReconnectStrategy instance.interval - the frequency, in millisecond, at which to try to reconnectpublic Long getTimeToNextAttempt(int attemptCount)
ReconnectStrategygetTimeToNextAttempt in interface ReconnectStrategyattemptCount - how many reconnect attempts have been made alreadynull to stop