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.



78
79
80
# File 'lib/raft.rb', line 78

def initialize(update_interval)
  @update_timer = Timer.new(update_interval)
end

Instance Attribute Details

#update_timerObject (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

#followersObject



72
73
74
# File 'lib/raft.rb', line 72

def followers
  @followers ||= {}
end