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.
94 95 96 |
# File 'lib/raft.rb', line 94 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.
92 93 94 |
# File 'lib/raft.rb', line 92 def update_timer @update_timer end |
Instance Method Details
#followers ⇒ Object
88 89 90 |
# File 'lib/raft.rb', line 88 def followers @followers ||= {} end |