Record Class WalStats

java.lang.Object
java.lang.Record
com.loomcache.server.persistence.WalStats
Record Components:
totalBytesWritten - Total bytes written to WAL
totalEntriesWritten - Total entries appended
totalSyncs - Number of fsync operations performed
avgBatchSize - Average entries per batch
lastSyncTimeNanos - Timestamp of last sync in nanoseconds
totalCorruptedEntries - 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 Details

    • WalStats

      public WalStats(long totalBytesWritten, long totalEntriesWritten, long totalSyncs, double avgBatchSize, long lastSyncTimeNanos, long totalCorruptedEntries)
      Creates an instance of a WalStats record class.
      Parameters:
      totalBytesWritten - the value for the totalBytesWritten record component
      totalEntriesWritten - the value for the totalEntriesWritten record component
      totalSyncs - the value for the totalSyncs record component
      avgBatchSize - the value for the avgBatchSize record component
      lastSyncTimeNanos - the value for the lastSyncTimeNanos record component
      totalCorruptedEntries - the value for the totalCorruptedEntries 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.
    • totalBytesWritten

      public long totalBytesWritten()
      Returns the value of the totalBytesWritten record component.
      Returns:
      the value of the totalBytesWritten record component
    • totalEntriesWritten

      public long totalEntriesWritten()
      Returns the value of the totalEntriesWritten record component.
      Returns:
      the value of the totalEntriesWritten record component
    • totalSyncs

      public long totalSyncs()
      Returns the value of the totalSyncs record component.
      Returns:
      the value of the totalSyncs record component
    • avgBatchSize

      public double avgBatchSize()
      Returns the value of the avgBatchSize record component.
      Returns:
      the value of the avgBatchSize record component
    • lastSyncTimeNanos

      public long lastSyncTimeNanos()
      Returns the value of the lastSyncTimeNanos record component.
      Returns:
      the value of the lastSyncTimeNanos record component
    • totalCorruptedEntries

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