class
Qdrant::Api::RaftInfo
- Qdrant::Api::RaftInfo
- Reference
- Object
Overview
Summary information about the current raft state
Included Modules
- JSON::Serializable
- Qdrant::Api::Serializable
- Qdrant::Api::Validation
- YAML::Serializable
Defined in:
qdrant-api/models/raft_info.crConstructors
-
.new(term : Int32, commit : Int32, pending_operations : Int32, is_voter : Bool, leader : Int32 | Nil = nil, role : StateRole | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Instance Method Summary
-
#==(other : self)
Returns
trueif this reference is the same as other. -
#commit : Int32
The index of the latest committed (finalized) operation that this peer is aware of.
-
#commit=(value : Int32)
The index of the latest committed (finalized) operation that this peer is aware of.
- #commit_validation_error(value) : String | Nil
-
#hash(hasher)
See
Object#hash(hasher) -
#is_voter : Bool
Is this peer a voter or a learner
-
#is_voter=(is_voter : Bool)
Is this peer a voter or a learner
-
#leader : Int32 | Nil
Optional properties Leader of the current term
-
#leader=(value : Int32 | Nil)
Optional properties Leader of the current term
- #leader_validation_error(value) : String | Nil
-
#list_invalid_properties
Show invalid properties with the reasons.
-
#pending_operations : Int32
Number of consensus operations pending to be applied on this peer
-
#pending_operations=(value : Int32)
Number of consensus operations pending to be applied on this peer
- #pending_operations_validation_error(value) : String | Nil
-
#role : StateRole | Nil
Role of this peer in the current term
-
#role=(role : StateRole | Nil)
Role of this peer in the current term
-
#term : Int32
Required properties Raft divides time into terms of arbitrary length, each beginning with an election.
-
#term=(value : Int32)
Required properties Raft divides time into terms of arbitrary length, each beginning with an election.
- #term_validation_error(value) : String | Nil
-
#valid?
Check to see if the all the properties in the model are valid @return true if the model is valid
Macros inherited from module Qdrant::Api::Validation
validates(name, klass, nilable, **rules)
validates
Instance methods inherited from module Qdrant::Api::Serializable
eql?(other)
eql?,
to_body : Hash(String, JSON::Any)
to_body,
to_h : Hash(String, JSON::Any)
to_h,
to_s(io : IO) : Nil
to_s
Constructor Detail
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Returns true if this reference is the same as other. Invokes same?.
The index of the latest committed (finalized) operation that this peer is aware of.
The index of the latest committed (finalized) operation that this peer is aware of.
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Number of consensus operations pending to be applied on this peer
Required properties Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.
Required properties Raft divides time into terms of arbitrary length, each beginning with an election. If a candidate wins the election, it remains the leader for the rest of the term. The term number increases monotonically. Each server stores the current term number which is also exchanged in every communication.
Check to see if the all the properties in the model are valid @return true if the model is valid