Class: Raft::LeadershipState

Inherits:
Object
  • Object
show all
Defined in:
lib/raft.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_timerObject (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

#followersObject



88
89
90
# File 'lib/raft.rb', line 88

def followers
  @followers ||= {}
end