Record Class PartitionMigrationPipeline.MigrationStats

java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionMigrationPipeline.MigrationStats
Enclosing class:
PartitionMigrationPipeline

public static record PartitionMigrationPipeline.MigrationStats(long totalMigrations, long successful, long failed, long avgDurationMs, long totalBytesTransferred) extends Record
Statistics record for migration pipeline metrics.
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    MigrationStats(long totalMigrations, long successful, long failed, long avgDurationMs, long totalBytesTransferred)
    Creates an instance of a MigrationStats record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the avgDurationMs record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the failed record component.
    double
     
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the successful record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the totalBytesTransferred record component.
    long
    Returns the value of the totalMigrations record component.

    Methods inherited from class Object

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

    • MigrationStats

      public MigrationStats(long totalMigrations, long successful, long failed, long avgDurationMs, long totalBytesTransferred)
      Creates an instance of a MigrationStats record class.
      Parameters:
      totalMigrations - the value for the totalMigrations record component
      successful - the value for the successful record component
      failed - the value for the failed record component
      avgDurationMs - the value for the avgDurationMs record component
      totalBytesTransferred - the value for the totalBytesTransferred record component
  • Method Details

    • getSuccessRate

      public double getSuccessRate()
    • 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.
    • totalMigrations

      public long totalMigrations()
      Returns the value of the totalMigrations record component.
      Returns:
      the value of the totalMigrations record component
    • successful

      public long successful()
      Returns the value of the successful record component.
      Returns:
      the value of the successful record component
    • failed

      public long failed()
      Returns the value of the failed record component.
      Returns:
      the value of the failed record component
    • avgDurationMs

      public long avgDurationMs()
      Returns the value of the avgDurationMs record component.
      Returns:
      the value of the avgDurationMs record component
    • totalBytesTransferred

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