Class RecordingLog.Entry

java.lang.Object
io.aeron.cluster.RecordingLog.Entry
Enclosing class:
RecordingLog

public static final class RecordingLog.Entry extends Object
Representation of the entry in the RecordingLog.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    Endpoint for an archive where a remote snapshot is located.
    final int
    Index of the entry in the recording log.
    final boolean
    Flag to indicate if the entry is invalid and thus should be ignored.
    final long
    Identity of the leadership term.
    final long
    Position the log has reached for the entry.
    final long
    Identity of the recording in the archive.
    final int
    Identity of the service associated with the entry.
    final long
    The log position at the base of the leadership term.
    final long
    Timestamp for the cluster clock in the time units configured for the cluster.
    final int
    Type, or classification, of the entry, e.g.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Entry(long recordingId, long leadershipTermId, long termBaseLogPosition, long logPosition, long timestamp, int serviceId, int type, String archiveEndpoint, boolean isValid, long position, int entryIndex)
    A new entry in the recording log.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    int
    int
    Binary length of the serialised entry including alignment.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • recordingId

      public final long recordingId
      Identity of the recording in the archive.
    • leadershipTermId

      public final long leadershipTermId
      Identity of the leadership term.
    • termBaseLogPosition

      public final long termBaseLogPosition
      The log position at the base of the leadership term.
    • logPosition

      public final long logPosition
      Position the log has reached for the entry.
    • timestamp

      public final long timestamp
      Timestamp for the cluster clock in the time units configured for the cluster.
    • serviceId

      public final int serviceId
      Identity of the service associated with the entry.
    • type

      public final int type
      Type, or classification, of the entry, e.g. RecordingLog.ENTRY_TYPE_TERM or RecordingLog.ENTRY_TYPE_SNAPSHOT.
    • entryIndex

      public final int entryIndex
      Index of the entry in the recording log.
    • isValid

      public final boolean isValid
      Flag to indicate if the entry is invalid and thus should be ignored.
    • archiveEndpoint

      public final String archiveEndpoint
      Endpoint for an archive where a remote snapshot is located.
  • Constructor Details

    • Entry

      public Entry(long recordingId, long leadershipTermId, long termBaseLogPosition, long logPosition, long timestamp, int serviceId, int type, String archiveEndpoint, boolean isValid, long position, int entryIndex)
      A new entry in the recording log.
      Parameters:
      recordingId - of the entry in an archive.
      leadershipTermId - of this entry.
      termBaseLogPosition - position of the log over leadership terms at the beginning of this term.
      logPosition - position reached when the entry was created
      timestamp - of this entry.
      serviceId - service id for snapshot.
      type - of the entry as a log of a term or a snapshot.
      archiveEndpoint - archive where the snapshot is located, if entryType == ENTRY_TYPE_STANDBY_SNAPSHOT.
      isValid - indicates if the entry is valid, RecordingLog.invalidateEntry(int) marks it invalid.
      position - of the entry on disk.
      entryIndex - of the entry on disk.
      Throws:
      ClusterException - if entryType == ENTRY_TYPE_STANDBY_SNAPSHOT and endpoint is null or empty.
  • Method Details

    • length

      public int length()
      Binary length of the serialised entry including alignment.
      Returns:
      length of this entry.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object