Class: Raft::Cluster
- Inherits:
-
Object
- Object
- Raft::Cluster
- Defined in:
- lib/raft.rb
Instance Attribute Summary collapse
-
#node_ids ⇒ Object
Returns the value of attribute node_ids.
Instance Method Summary collapse
Instance Attribute Details
#node_ids ⇒ Object
Returns the value of attribute node_ids.
5 6 7 |
# File 'lib/raft.rb', line 5 def node_ids @node_ids end |
Instance Method Details
#quorum ⇒ Object
7 8 9 |
# File 'lib/raft.rb', line 7 def quorum @node_ids.size / 2 + 1 # integer division rounds down end |