Record Class LeaseManager.LeaseInfo
java.lang.Object
java.lang.Record
com.loomcache.server.lease.LeaseManager.LeaseInfo
- Record Components:
id- the lease IDttlSeconds- the total TTL in secondsremainingTtl- the remaining TTL in secondsattachedKeysCount- the number of keys attached to this lease
- Enclosing class:
LeaseManager
public static record LeaseManager.LeaseInfo(long id, long ttlSeconds, long remainingTtl, int attachedKeysCount)
extends Record
Information about a lease (snapshot).
- Since:
- 1.5
-
Constructor Summary
ConstructorsConstructorDescriptionLeaseInfo(long id, long ttlSeconds, long remainingTtl, int attachedKeysCount) Creates an instance of aLeaseInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theattachedKeysCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.longReturns the value of theremainingTtlrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thettlSecondsrecord component.
-
Constructor Details
-
LeaseInfo
public LeaseInfo(long id, long ttlSeconds, long remainingTtl, int attachedKeysCount) Creates an instance of aLeaseInforecord class.- Parameters:
id- the value for theidrecord componentttlSeconds- the value for thettlSecondsrecord componentremainingTtl- the value for theremainingTtlrecord componentattachedKeysCount- the value for theattachedKeysCountrecord 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. -
id
-
ttlSeconds
public long ttlSeconds()Returns the value of thettlSecondsrecord component.- Returns:
- the value of the
ttlSecondsrecord component
-
remainingTtl
public long remainingTtl()Returns the value of theremainingTtlrecord component.- Returns:
- the value of the
remainingTtlrecord component
-
attachedKeysCount
public int attachedKeysCount()Returns the value of theattachedKeysCountrecord component.- Returns:
- the value of the
attachedKeysCountrecord component
-