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
ConstructorsConstructorDescriptionMigrationStats(long totalMigrations, long successful, long failed, long avgDurationMs, long totalBytesTransferred) Creates an instance of aMigrationStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theavgDurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.longfailed()Returns the value of thefailedrecord component.doublefinal inthashCode()Returns a hash code value for this object.longReturns the value of thesuccessfulrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBytesTransferredrecord component.longReturns the value of thetotalMigrationsrecord component.
-
Constructor Details
-
MigrationStats
public MigrationStats(long totalMigrations, long successful, long failed, long avgDurationMs, long totalBytesTransferred) Creates an instance of aMigrationStatsrecord class.- Parameters:
totalMigrations- the value for thetotalMigrationsrecord componentsuccessful- the value for thesuccessfulrecord componentfailed- the value for thefailedrecord componentavgDurationMs- the value for theavgDurationMsrecord componenttotalBytesTransferred- the value for thetotalBytesTransferredrecord component
-
-
Method Details
-
getSuccessRate
public double getSuccessRate() -
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
totalMigrations
public long totalMigrations()Returns the value of thetotalMigrationsrecord component.- Returns:
- the value of the
totalMigrationsrecord component
-
successful
public long successful()Returns the value of thesuccessfulrecord component.- Returns:
- the value of the
successfulrecord component
-
failed
public long failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
avgDurationMs
public long avgDurationMs()Returns the value of theavgDurationMsrecord component.- Returns:
- the value of the
avgDurationMsrecord component
-
totalBytesTransferred
public long totalBytesTransferred()Returns the value of thetotalBytesTransferredrecord component.- Returns:
- the value of the
totalBytesTransferredrecord component
-