Record Class BatchExecutionStats

java.lang.Object
java.lang.Record
com.loomcache.server.handler.BatchExecutionStats
Record Components:
totalBatches - total number of batches processed
totalOps - total number of operations executed
successfulBatches - number of batches that completed successfully
failedBatches - number of batches that failed
avgBatchSize - average number of operations per batch
avgExecutionTimeMs - average execution time per batch in milliseconds

public record BatchExecutionStats(long totalBatches, long totalOps, long successfulBatches, long failedBatches, double avgBatchSize, double avgExecutionTimeMs) extends Record
Execution statistics for batch operations.

Immutable record capturing metrics about batch processing operations.

Since:
1.4
  • Constructor Details

    • BatchExecutionStats

      public BatchExecutionStats(long totalBatches, long totalOps, long successfulBatches, long failedBatches, double avgBatchSize, double avgExecutionTimeMs)
      Creates an instance of a BatchExecutionStats record class.
      Parameters:
      totalBatches - the value for the totalBatches record component
      totalOps - the value for the totalOps record component
      successfulBatches - the value for the successfulBatches record component
      failedBatches - the value for the failedBatches record component
      avgBatchSize - the value for the avgBatchSize record component
      avgExecutionTimeMs - the value for the avgExecutionTimeMs 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.
    • totalBatches

      public long totalBatches()
      Returns the value of the totalBatches record component.
      Returns:
      the value of the totalBatches record component
    • totalOps

      public long totalOps()
      Returns the value of the totalOps record component.
      Returns:
      the value of the totalOps record component
    • successfulBatches

      public long successfulBatches()
      Returns the value of the successfulBatches record component.
      Returns:
      the value of the successfulBatches record component
    • failedBatches

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

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

      public double avgExecutionTimeMs()
      Returns the value of the avgExecutionTimeMs record component.
      Returns:
      the value of the avgExecutionTimeMs record component