com.datastax.driver.core.policies
Class ConstantReconnectionPolicy
java.lang.Object
com.datastax.driver.core.policies.ConstantReconnectionPolicy
- All Implemented Interfaces:
- ReconnectionPolicy
public class ConstantReconnectionPolicy
- extends Object
- implements ReconnectionPolicy
A reconnection policy that waits a constant time between each reconnection attempt.
Constructor Summary |
ConstantReconnectionPolicy(long constantDelayMs)
Creates a reconnection policy that creates with the provided constant wait
time between reconnection attempts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantReconnectionPolicy
public ConstantReconnectionPolicy(long constantDelayMs)
- Creates a reconnection policy that creates with the provided constant wait
time between reconnection attempts.
- Parameters:
constantDelayMs
- the constant delay in milliseconds to use.
getConstantDelayMs
public long getConstantDelayMs()
- The constant delay used by this reconnection policy.
- Returns:
- the constant delay used by this reconnection policy.
newSchedule
public ReconnectionPolicy.ReconnectionSchedule newSchedule()
- A new schedule that uses a constant
getConstantDelayMs()
delay
between reconnection attempt.
- Specified by:
newSchedule
in interface ReconnectionPolicy
- Returns:
- the newly created schedule.
Copyright © 2013. All Rights Reserved.