A reconnection policy that returns a constant exponentially growing reconnection interval up to a given maximum

Inherits

Methods

self.

new

(start, max, exponent = 2)

Returns a new instance of Exponential

Examples:
Using this policy
policy   = Cassandra::Reconnection::Policies::Exponential.new(0.5, 10, 2)
schedule = policy.schedule
schedule.next # 0.5
schedule.next # 1.0
schedule.next # 2.0
schedule.next # 4.0
schedule.next # 8.0
schedule.next # 10.0
schedule.next # 10.0
schedule.next # 10.0
Parameters:
Name Type Details
start Numeric beginning interval
max Numeric maximum reconnection interval
exponent Numeric (defaults to: 2) (2) interval exponent to use

schedule

Returns an exponential reconnection schedule

Returns:
Type Details
Reconnection::Schedule an exponential reconnection schedule