Class: Raft::TemporaryState

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commit_index, leader_id) ⇒ TemporaryState

Returns a new instance of TemporaryState.



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

def initialize(commit_index, leader_id)
  @commit_index, @leader_id = commit_index, leader_id
end

Instance Attribute Details

#commit_indexObject

Returns the value of attribute commit_index.



74
75
76
# File 'lib/raft.rb', line 74

def commit_index
  @commit_index
end

#leader_idObject

Returns the value of attribute leader_id.



75
76
77
# File 'lib/raft.rb', line 75

def leader_id
  @leader_id
end