Record Class ReadReplicaManager.ReplicaInfo
java.lang.Object
java.lang.Record
com.loomcache.server.replication.ReadReplicaManager.ReplicaInfo
- Enclosing class:
ReadReplicaManager
public static record ReadReplicaManager.ReplicaInfo(String replicaId, String address, ReadReplicaManager.ReplicaState state, long lastSyncedIndex, long lagMs, long leaderLastObservedIndex, long connectedAt)
extends Record
Information about a read replica.
-
Constructor Summary
ConstructorsConstructorDescriptionReplicaInfo(String replicaId, String address, ReadReplicaManager.ReplicaState state, long lastSyncedIndex, long lagMs, long leaderLastObservedIndex, long connectedAt) Creates an instance of aReplicaInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.longReturns the value of theconnectedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longlagMs()Returns the value of thelagMsrecord component.longReturns the value of thelastSyncedIndexrecord component.longReturns the value of theleaderLastObservedIndexrecord component.Returns the value of thereplicaIdrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReplicaInfo
public ReplicaInfo(String replicaId, String address, ReadReplicaManager.ReplicaState state, long lastSyncedIndex, long lagMs, long leaderLastObservedIndex, long connectedAt) Creates an instance of aReplicaInforecord class.- Parameters:
replicaId- the value for thereplicaIdrecord componentaddress- the value for theaddressrecord componentstate- the value for thestaterecord componentlastSyncedIndex- the value for thelastSyncedIndexrecord componentlagMs- the value for thelagMsrecord componentleaderLastObservedIndex- the value for theleaderLastObservedIndexrecord componentconnectedAt- the value for theconnectedAtrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
replicaId
Returns the value of thereplicaIdrecord component.- Returns:
- the value of the
replicaIdrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
lastSyncedIndex
public long lastSyncedIndex()Returns the value of thelastSyncedIndexrecord component.- Returns:
- the value of the
lastSyncedIndexrecord component
-
lagMs
public long lagMs()Returns the value of thelagMsrecord component.- Returns:
- the value of the
lagMsrecord component
-
leaderLastObservedIndex
public long leaderLastObservedIndex()Returns the value of theleaderLastObservedIndexrecord component.- Returns:
- the value of the
leaderLastObservedIndexrecord component
-
connectedAt
public long connectedAt()Returns the value of theconnectedAtrecord component.- Returns:
- the value of the
connectedAtrecord component
-