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)
ReconnectStrategy
getTimeToNextAttempt
in interface ReconnectStrategy
attemptCount
- how many reconnect attempts have been made alreadynull
to stop