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 |
---|---|
void |
close()
Gets invoked at cluster shutdown.
|
long |
getConstantDelayMs()
The constant delay used by this reconnection policy.
|
void |
init(Cluster cluster)
Gets invoked at cluster startup.
|
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
public void init(Cluster cluster)
ReconnectionPolicy
init
in interface ReconnectionPolicy
cluster
- the cluster that this policy is associated with.public void close()
ReconnectionPolicy
close
in interface ReconnectionPolicy
Copyright © 2012–2017. All rights reserved.