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.
78 79 80 |
# File 'lib/raft.rb', line 78 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.
76 77 78 |
# File 'lib/raft.rb', line 76 def update_timer @update_timer end |
Instance Method Details
#followers ⇒ Object
72 73 74 |
# File 'lib/raft.rb', line 72 def followers @followers ||= {} end |