public interface ReconnectionPolicy
Each time a node is detected dead (because a connection error occurs), a new
ReconnectionSchedule instance is created (through the
newSchedule()). Then each call to
ReconnectionPolicy.ReconnectionSchedule.nextDelayMs() method of this instance will decide when the next
reconnection attempt to this node will be tried.
Note that if the driver receives a push notification from the Cassandra cluster that a node is
UP, any existing
ReconnectionSchedule on that node will be cancelled and a new one will
be created (in effect, the driver reset the scheduler).
ExponentialReconnectionPolicy policy is usually adequate.
|Modifier and Type||Interface and Description|
Schedules reconnection attempts to a node.
|Modifier and Type||Method and Description|
Gets invoked at cluster shutdown.
Gets invoked at cluster startup.
Creates a new schedule for reconnection attempts.
void init(Cluster cluster)
cluster- the cluster that this policy is associated with.
This gives the policy the opportunity to perform some cleanup, for instance stop threads that it might have started.
Copyright © 2012–2019. All rights reserved.