Class: Raft::LeadershipState
- Inherits:
-
Object
- Object
- Raft::LeadershipState
- Defined in:
- lib/raft.rb
Instance Attribute Summary collapse
-
#update_timer ⇒ Object
readonly
Returns the value of attribute update_timer.
Instance Method Summary collapse
- #followers ⇒ Object
-
#initialize(update_interval) ⇒ LeadershipState
constructor
A new instance of LeadershipState.
Constructor Details
#initialize(update_interval) ⇒ LeadershipState
Returns a new instance of LeadershipState.
23 24 25 |
# File 'lib/raft.rb', line 23 def initialize(update_interval) @update_timer = Timer.new(update_interval) end |
Instance Attribute Details
#update_timer ⇒ Object (readonly)
Returns the value of attribute update_timer.
21 22 23 |
# File 'lib/raft.rb', line 21 def update_timer @update_timer end |
Instance Method Details
#followers ⇒ Object
17 18 19 |
# File 'lib/raft.rb', line 17 def followers @followers ||= {} end |