Record Class JournalStats
java.lang.Object
java.lang.Record
com.loomcache.server.journal.JournalStats
- Record Components:
totalAppended- Total number of entries appended to the journaltotalRead- Total number of read operations performedcurrentSize- Current number of entries in the journaloldestSequence- 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 Summary
ConstructorsConstructorDescriptionJournalStats(long totalAppended, long totalRead, long currentSize, long oldestSequence, long latestSequence) Creates an instance of aJournalStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecurrentSizerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelatestSequencerecord component.longReturns the value of theoldestSequencerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAppendedrecord component.longReturns the value of thetotalReadrecord component.
-
Constructor Details
-
JournalStats
public JournalStats(long totalAppended, long totalRead, long currentSize, long oldestSequence, long latestSequence) Creates an instance of aJournalStatsrecord class.- Parameters:
totalAppended- the value for thetotalAppendedrecord componenttotalRead- the value for thetotalReadrecord componentcurrentSize- the value for thecurrentSizerecord componentoldestSequence- the value for theoldestSequencerecord componentlatestSequence- the value for thelatestSequencerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
totalAppended
public long totalAppended()Returns the value of thetotalAppendedrecord component.- Returns:
- the value of the
totalAppendedrecord component
-
totalRead
-
currentSize
public long currentSize()Returns the value of thecurrentSizerecord component.- Returns:
- the value of the
currentSizerecord component
-
oldestSequence
public long oldestSequence()Returns the value of theoldestSequencerecord component.- Returns:
- the value of the
oldestSequencerecord component
-
latestSequence
public long latestSequence()Returns the value of thelatestSequencerecord component.- Returns:
- the value of the
latestSequencerecord component
-