Record Class ReadReplicaManager.ReadReplicaStats
java.lang.Object
java.lang.Record
com.loomcache.server.replication.ReadReplicaManager.ReadReplicaStats
- Enclosing class:
ReadReplicaManager
public static record ReadReplicaManager.ReadReplicaStats(int totalReplicas, int activeReplicas, long avgLagMs, long maxLagMs)
extends Record
Aggregated stats about all replicas.
-
Constructor Summary
ConstructorsConstructorDescriptionReadReplicaStats(int totalReplicas, int activeReplicas, long avgLagMs, long maxLagMs) Creates an instance of aReadReplicaStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveReplicasrecord component.longavgLagMs()Returns the value of theavgLagMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmaxLagMs()Returns the value of themaxLagMsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalReplicasrecord component.
-
Constructor Details
-
ReadReplicaStats
public ReadReplicaStats(int totalReplicas, int activeReplicas, long avgLagMs, long maxLagMs) Creates an instance of aReadReplicaStatsrecord class.- Parameters:
totalReplicas- the value for thetotalReplicasrecord componentactiveReplicas- the value for theactiveReplicasrecord componentavgLagMs- the value for theavgLagMsrecord componentmaxLagMs- the value for themaxLagMsrecord component
-
-
Method Details
-
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. -
totalReplicas
public int totalReplicas()Returns the value of thetotalReplicasrecord component.- Returns:
- the value of the
totalReplicasrecord component
-
activeReplicas
public int activeReplicas()Returns the value of theactiveReplicasrecord component.- Returns:
- the value of the
activeReplicasrecord component
-
avgLagMs
public long avgLagMs()Returns the value of theavgLagMsrecord component.- Returns:
- the value of the
avgLagMsrecord component
-
maxLagMs
public long maxLagMs()Returns the value of themaxLagMsrecord component.- Returns:
- the value of the
maxLagMsrecord component
-