Record Class BufferPoolMetrics

java.lang.Object
java.lang.Record
express.mvp.roray.ffm.pool.BufferPoolMetrics

public record BufferPoolMetrics(long totalAcquisitions, long successfulAcquisitions, long failedAcquisitions, long avgWaitTimeNanos, long maxWaitTimeNanos, int currentAvailable, int poolSize) extends Record
Immutable snapshot of buffer pool performance metrics.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BufferPoolMetrics(long totalAcquisitions, long successfulAcquisitions, long failedAcquisitions, long avgWaitTimeNanos, long maxWaitTimeNanos, int currentAvailable, int poolSize)
    Creates an instance of a BufferPoolMetrics record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    long
    Returns the value of the avgWaitTimeNanos record component.
    int
    Returns the value of the currentAvailable record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the failedAcquisitions record component.
    double
     
    final int
    Returns a hash code value for this object.
    double
     
    long
    Returns the value of the maxWaitTimeNanos record component.
    int
    Returns the value of the poolSize record component.
    long
    Returns the value of the successfulAcquisitions record component.
    double
     
    Returns a string representation of this record class.
    long
    Returns the value of the totalAcquisitions record component.
    double
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BufferPoolMetrics

      public BufferPoolMetrics(long totalAcquisitions, long successfulAcquisitions, long failedAcquisitions, long avgWaitTimeNanos, long maxWaitTimeNanos, int currentAvailable, int poolSize)
      Creates an instance of a BufferPoolMetrics record class.
      Parameters:
      totalAcquisitions - the value for the totalAcquisitions record component
      successfulAcquisitions - the value for the successfulAcquisitions record component
      failedAcquisitions - the value for the failedAcquisitions record component
      avgWaitTimeNanos - the value for the avgWaitTimeNanos record component
      maxWaitTimeNanos - the value for the maxWaitTimeNanos record component
      currentAvailable - the value for the currentAvailable record component
      poolSize - the value for the poolSize record component
  • Method Details

    • successRate

      public double successRate()
    • failureRate

      public double failureRate()
    • utilization

      public double utilization()
    • avgWaitTimeMillis

      public double avgWaitTimeMillis()
    • maxWaitTimeMillis

      public double maxWaitTimeMillis()
    • toString

      public 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.
    • totalAcquisitions

      public long totalAcquisitions()
      Returns the value of the totalAcquisitions record component.
      Returns:
      the value of the totalAcquisitions record component
    • successfulAcquisitions

      public long successfulAcquisitions()
      Returns the value of the successfulAcquisitions record component.
      Returns:
      the value of the successfulAcquisitions record component
    • failedAcquisitions

      public long failedAcquisitions()
      Returns the value of the failedAcquisitions record component.
      Returns:
      the value of the failedAcquisitions record component
    • avgWaitTimeNanos

      public long avgWaitTimeNanos()
      Returns the value of the avgWaitTimeNanos record component.
      Returns:
      the value of the avgWaitTimeNanos record component
    • maxWaitTimeNanos

      public long maxWaitTimeNanos()
      Returns the value of the maxWaitTimeNanos record component.
      Returns:
      the value of the maxWaitTimeNanos record component
    • currentAvailable

      public int currentAvailable()
      Returns the value of the currentAvailable record component.
      Returns:
      the value of the currentAvailable record component
    • poolSize

      public int poolSize()
      Returns the value of the poolSize record component.
      Returns:
      the value of the poolSize record component