All Implemented Interfaces:
Serializable, RaftCommand, StateMachineCommand, Immutable

@NonNullByDefault public final class VotingConfig extends AbstractRaftCommand
RAFT cluster configuration. This command is always persisted, no matter whether or not we are persisting other data distributed via ReplicatedLogEntry.
See Also:
  • Constructor Details

    • VotingConfig

      public VotingConfig(ServerInfo serverInfo)
    • VotingConfig

      public VotingConfig(ServerInfo... serverInfo)
    • VotingConfig

      public VotingConfig(List<ServerInfo> serverInfo)
  • Method Details

    • serverInfo

      public List<ServerInfo> serverInfo()
      Returns known ServerInfo structures.
      Returns:
      known ServerInfo structures
    • size

      public int size()
      Description copied from class: Payload
      Return the estimate of in-memory size of this payload.
      Specified by:
      size in class Payload
      Returns:
      An estimate of the in-memory size of this payload.
    • serializedSize

      public int serializedSize()
      Description copied from class: Payload
      Return the estimate of serialized size of this payload when passed through serialization. The estimate needs to be reasonably accurate and should err on the side of caution and report a slightly-higher size in face of uncertainty.
      Specified by:
      serializedSize in class Payload
      Returns:
      An estimate of serialized size.
    • writeReplace

      protected Object writeReplace()
      Description copied from class: Payload
      Return the serialization proxy for this object.
      Specified by:
      writeReplace in class Payload
      Returns:
      Serialization proxy
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object