Interface ReplicatedLogEntry

All Superinterfaces:
RaftEntryMeta
All Known Implementing Classes:
SimpleReplicatedLogEntry

public interface ReplicatedLogEntry extends RaftEntryMeta
Represents one entry in the replicated log.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the payload/data to be replicated.
    default long
    Deprecated, for removal: This API element is subject to removal in a future version.
    default long
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Checks if persistence is pending for this entry.
    int
    Return the estimate of serialized size of this entry when passed through serialization.
    void
    setPersistencePending(boolean pending)
    Sets whether or not persistence is pending for this entry.
    int
    Returns the size of the entry in bytes.

    Methods inherited from interface org.opendaylight.controller.cluster.raft.RaftEntryMeta

    index, term
  • Method Details

    • getData

      Payload getData()
      Returns the payload/data to be replicated.
      Returns:
      the payload/data
    • getTerm

      @Deprecated(since="9.0.3", forRemoval=true) default long getTerm()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the term of the entry.
      Returns:
      the term
    • getIndex

      @Deprecated(since="9.0.3", forRemoval=true) default long getIndex()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the index of the entry.
      Returns:
      the index
    • size

      int size()
      Returns the size of the entry in bytes. An approximate number may be good enough.
      Returns:
      the size of the entry in bytes.
    • serializedSize

      int serializedSize()
      Return the estimate of serialized size of this entry 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.
      Returns:
      An estimate of serialized size.
    • isPersistencePending

      boolean isPersistencePending()
      Checks if persistence is pending for this entry.
      Returns:
      true if persistence is pending, false otherwise.
    • setPersistencePending

      void setPersistencePending(boolean pending)
      Sets whether or not persistence is pending for this entry.
      Parameters:
      pending - the new setting.