public class ConstantReconnectionPolicy extends Object implements ReconnectionPolicy
ReconnectionPolicy.ReconnectionSchedule
Constructor and Description |
---|
ConstantReconnectionPolicy(long constantDelayMs)
Creates a reconnection policy that creates with the provided constant wait
time between reconnection attempts.
|
Modifier and Type | Method and Description |
---|---|
long |
getConstantDelayMs()
The constant delay used by this reconnection policy.
|
ReconnectionPolicy.ReconnectionSchedule |
newSchedule()
A new schedule that uses a constant
getConstantDelayMs() delay
between reconnection attempt. |
public ConstantReconnectionPolicy(long constantDelayMs)
constantDelayMs
- the constant delay in milliseconds to use.public long getConstantDelayMs()
public ReconnectionPolicy.ReconnectionSchedule newSchedule()
getConstantDelayMs()
delay
between reconnection attempt.newSchedule
in interface ReconnectionPolicy