Class: Cassandra::Reconnection::Policies::Constant
- Inherits:
-
Cassandra::Reconnection::Policy
- Object
- Cassandra::Reconnection::Policy
- Cassandra::Reconnection::Policies::Constant
- Defined in:
- lib/cassandra/reconnection/policies/constant.rb
Overview
A reconnection policy that returns a constant reconnection interval
Instance Method Summary collapse
-
#initialize(interval) ⇒ Constant
constructor
A new instance of Constant.
-
#schedule ⇒ Cassandra::Reconnection::Schedule
Reconnection schedule with constant interval.
Constructor Details
#initialize(interval) ⇒ Constant
Returns a new instance of Constant.
36 37 38 |
# File 'lib/cassandra/reconnection/policies/constant.rb', line 36 def initialize(interval) @schedule = Schedule.new(Float(interval)) end |
Instance Method Details
#schedule ⇒ Cassandra::Reconnection::Schedule
Returns reconnection schedule with constant interval.
42 43 44 |
# File 'lib/cassandra/reconnection/policies/constant.rb', line 42 def schedule @schedule end |