Record Class JournalStats

java.lang.Object
java.lang.Record
com.loomcache.server.journal.JournalStats
Record Components:
totalAppended - Total number of entries appended to the journal
totalRead - Total number of read operations performed
currentSize - Current number of entries in the journal
oldestSequence - Sequence number of the oldest entry (or -1 if empty)
latestSequence - Sequence number of the newest entry (or -1 if empty)

public record JournalStats(long totalAppended, long totalRead, long currentSize, long oldestSequence, long latestSequence) extends Record
Statistics for a distributed event journal.
Since:
1.0
  • Constructor Details

    • JournalStats

      public JournalStats(long totalAppended, long totalRead, long currentSize, long oldestSequence, long latestSequence)
      Creates an instance of a JournalStats record class.
      Parameters:
      totalAppended - the value for the totalAppended record component
      totalRead - the value for the totalRead record component
      currentSize - the value for the currentSize record component
      oldestSequence - the value for the oldestSequence record component
      latestSequence - the value for the latestSequence record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • totalAppended

      public long totalAppended()
      Returns the value of the totalAppended record component.
      Returns:
      the value of the totalAppended record component
    • totalRead

      public long totalRead()
      Returns the value of the totalRead record component.
      Returns:
      the value of the totalRead record component
    • currentSize

      public long currentSize()
      Returns the value of the currentSize record component.
      Returns:
      the value of the currentSize record component
    • oldestSequence

      public long oldestSequence()
      Returns the value of the oldestSequence record component.
      Returns:
      the value of the oldestSequence record component
    • latestSequence

      public long latestSequence()
      Returns the value of the latestSequence record component.
      Returns:
      the value of the latestSequence record component