Record Class LogMetricsSnapshot

java.lang.Object
java.lang.Record
org.j7m.middleware.api.durablelog.LogMetricsSnapshot
Record Components:
appendCount - appended record count
readCount - cursor read operation count
fsyncCount - storage sync count
recoveryCount - recovery run count
corruptionCount - detected corruption count
truncatedRecordCount - truncated record count
bytesWritten - encoded bytes written
bytesRead - encoded bytes read
lastAppendTimestampMillis - last append timestamp in epoch milliseconds
lastRecoveryTimestampMillis - last recovery timestamp in epoch milliseconds
All Implemented Interfaces:
Serializable

public record LogMetricsSnapshot(long appendCount, long readCount, long fsyncCount, long recoveryCount, long corruptionCount, long truncatedRecordCount, long bytesWritten, long bytesRead, long lastAppendTimestampMillis, long lastRecoveryTimestampMillis) extends Record implements Serializable
Durable-log metrics snapshot.
See Also:
  • Constructor Details

    • LogMetricsSnapshot

      public LogMetricsSnapshot(long appendCount, long readCount, long fsyncCount, long recoveryCount, long corruptionCount, long truncatedRecordCount, long bytesWritten, long bytesRead, long lastAppendTimestampMillis, long lastRecoveryTimestampMillis)
      Creates metrics.
  • Method Details

    • empty

      public static LogMetricsSnapshot empty()
      Empty metrics.
      Returns:
      empty metrics snapshot
    • 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.
    • appendCount

      public long appendCount()
      Returns the value of the appendCount record component.
      Returns:
      the value of the appendCount record component
    • readCount

      public long readCount()
      Returns the value of the readCount record component.
      Returns:
      the value of the readCount record component
    • fsyncCount

      public long fsyncCount()
      Returns the value of the fsyncCount record component.
      Returns:
      the value of the fsyncCount record component
    • recoveryCount

      public long recoveryCount()
      Returns the value of the recoveryCount record component.
      Returns:
      the value of the recoveryCount record component
    • corruptionCount

      public long corruptionCount()
      Returns the value of the corruptionCount record component.
      Returns:
      the value of the corruptionCount record component
    • truncatedRecordCount

      public long truncatedRecordCount()
      Returns the value of the truncatedRecordCount record component.
      Returns:
      the value of the truncatedRecordCount record component
    • bytesWritten

      public long bytesWritten()
      Returns the value of the bytesWritten record component.
      Returns:
      the value of the bytesWritten record component
    • bytesRead

      public long bytesRead()
      Returns the value of the bytesRead record component.
      Returns:
      the value of the bytesRead record component
    • lastAppendTimestampMillis

      public long lastAppendTimestampMillis()
      Returns the value of the lastAppendTimestampMillis record component.
      Returns:
      the value of the lastAppendTimestampMillis record component
    • lastRecoveryTimestampMillis

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