Class: Raft::TemporaryState
- Inherits:
-
Object
- Object
- Raft::TemporaryState
- Defined in:
- lib/raft.rb
Instance Attribute Summary collapse
-
#commit_index ⇒ Object
Returns the value of attribute commit_index.
-
#leader_id ⇒ Object
Returns the value of attribute leader_id.
Instance Method Summary collapse
-
#initialize(commit_index, leader_id) ⇒ TemporaryState
constructor
A new instance of TemporaryState.
Constructor Details
#initialize(commit_index, leader_id) ⇒ TemporaryState
Returns a new instance of TemporaryState.
61 62 63 |
# File 'lib/raft.rb', line 61 def initialize(commit_index, leader_id) @commit_index, @leader_id = commit_index, leader_id end |
Instance Attribute Details
#commit_index ⇒ Object
Returns the value of attribute commit_index.
58 59 60 |
# File 'lib/raft.rb', line 58 def commit_index @commit_index end |
#leader_id ⇒ Object
Returns the value of attribute leader_id.
59 60 61 |
# File 'lib/raft.rb', line 59 def leader_id @leader_id end |