Record Class WalStats
java.lang.Object
java.lang.Record
com.loomcache.server.persistence.WalStats
- Record Components:
totalBytesWritten- Total bytes written to WALtotalEntriesWritten- Total entries appendedtotalSyncs- Number of fsync operations performedavgBatchSize- Average entries per batchlastSyncTimeNanos- Timestamp of last sync in nanosecondstotalCorruptedEntries- Count of corrupted entries detected
public record WalStats(long totalBytesWritten, long totalEntriesWritten, long totalSyncs, double avgBatchSize, long lastSyncTimeNanos, long totalCorruptedEntries)
extends Record
Statistics tracked by the WAL writer.
-
Constructor Summary
ConstructorsConstructorDescriptionWalStats(long totalBytesWritten, long totalEntriesWritten, long totalSyncs, double avgBatchSize, long lastSyncTimeNanos, long totalCorruptedEntries) Creates an instance of aWalStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgBatchSizerecord 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 thelastSyncTimeNanosrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBytesWrittenrecord component.longReturns the value of thetotalCorruptedEntriesrecord component.longReturns the value of thetotalEntriesWrittenrecord component.longReturns the value of thetotalSyncsrecord component.
-
Constructor Details
-
WalStats
public WalStats(long totalBytesWritten, long totalEntriesWritten, long totalSyncs, double avgBatchSize, long lastSyncTimeNanos, long totalCorruptedEntries) Creates an instance of aWalStatsrecord class.- Parameters:
totalBytesWritten- the value for thetotalBytesWrittenrecord componenttotalEntriesWritten- the value for thetotalEntriesWrittenrecord componenttotalSyncs- the value for thetotalSyncsrecord componentavgBatchSize- the value for theavgBatchSizerecord componentlastSyncTimeNanos- the value for thelastSyncTimeNanosrecord componenttotalCorruptedEntries- the value for thetotalCorruptedEntriesrecord 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. -
totalBytesWritten
public long totalBytesWritten()Returns the value of thetotalBytesWrittenrecord component.- Returns:
- the value of the
totalBytesWrittenrecord component
-
totalEntriesWritten
public long totalEntriesWritten()Returns the value of thetotalEntriesWrittenrecord component.- Returns:
- the value of the
totalEntriesWrittenrecord component
-
totalSyncs
public long totalSyncs()Returns the value of thetotalSyncsrecord component.- Returns:
- the value of the
totalSyncsrecord component
-
avgBatchSize
public double avgBatchSize()Returns the value of theavgBatchSizerecord component.- Returns:
- the value of the
avgBatchSizerecord component
-
lastSyncTimeNanos
public long lastSyncTimeNanos()Returns the value of thelastSyncTimeNanosrecord component.- Returns:
- the value of the
lastSyncTimeNanosrecord component
-
totalCorruptedEntries
public long totalCorruptedEntries()Returns the value of thetotalCorruptedEntriesrecord component.- Returns:
- the value of the
totalCorruptedEntriesrecord component
-