com.datastax.driver.core.policies
Class ConstantReconnectionPolicy

java.lang.Object
  extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.datastax.driver.core.policies.ReconnectionPolicy
ReconnectionPolicy.ReconnectionSchedule
 
Constructor Summary
ConstantReconnectionPolicy(long constantDelayMs)
          Creates a reconnection policy that creates with the provided constant wait time between reconnection attempts.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.