Contents
- Usage page
-
API docs index
-
Cassandra module
- AddressResolution module
- Auth module
- Compression module
- Error module
- Errors module
- Execution module
- LoadBalancing module
- Reconnection module
- Retry module
- Statement module
- Statements module
- Types module
- Cluster class
- Column class
- Future class
- Host class
- Keyspace class
- Listener class
- Result class
- Session class
- Table class
- TimeUuid class
- Tuple class
- Type class
- UDT class
- Uuid class
-
Cassandra module
A reconnection policy that returns a constant exponentially growing reconnection interval up to a given maximum
Inherits
Methods
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
Returns an exponential reconnection schedule
- Returns:
-
Type Details Reconnection::Schedule
an exponential reconnection schedule