Class PersistentState

java.lang.Object
org.jgroups.protocols.raft.PersistentState
All Implemented Interfaces:
org.jgroups.util.SizeStreamable, org.jgroups.util.Streamable

public class PersistentState extends Object implements org.jgroups.util.SizeStreamable
Responsible for a node's internal state.

The data in this class is serialized and stored at the beginning of a snapshot file. This class does not hold information that the RAFT protocol requires to be persistent, e.g., terms and votes.

Since:
1.0.11
Author:
Jose Bolina
  • Constructor Details

    • PersistentState

      public PersistentState()
  • Method Details

    • getMembers

      public List<String> getMembers()
    • setMembers

      public void setMembers(Collection<String> value)
    • writeTo

      public void writeTo(DataOutput out) throws IOException
      Specified by:
      writeTo in interface org.jgroups.util.Streamable
      Throws:
      IOException
    • readFrom

      public void readFrom(DataInput in) throws IOException
      Specified by:
      readFrom in interface org.jgroups.util.Streamable
      Throws:
      IOException
    • serializedSize

      public int serializedSize()
      Specified by:
      serializedSize in interface org.jgroups.util.SizeStreamable
    • toString

      public String toString()
      Overrides:
      toString in class Object