Record Class NearCache.CacheEntryMetadata
java.lang.Object
java.lang.Record
com.loomcache.client.cache.NearCache.CacheEntryMetadata
-
Constructor Summary
ConstructorsConstructorDescriptionCacheEntryMetadata(long hitCount, long lastAccessNs, long createdAtNs, Duration ttl) Creates an instance of aCacheEntryMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecreatedAtNsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longhitCount()Returns the value of thehitCountrecord component.longReturns the value of thelastAccessNsrecord component.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.
-
Constructor Details
-
CacheEntryMetadata
Creates an instance of aCacheEntryMetadatarecord class.- Parameters:
hitCount- the value for thehitCountrecord componentlastAccessNs- the value for thelastAccessNsrecord componentcreatedAtNs- the value for thecreatedAtNsrecord componentttl- the value for thettlrecord 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. -
hitCount
public long hitCount()Returns the value of thehitCountrecord component.- Returns:
- the value of the
hitCountrecord component
-
lastAccessNs
public long lastAccessNs()Returns the value of thelastAccessNsrecord component.- Returns:
- the value of the
lastAccessNsrecord component
-
createdAtNs
public long createdAtNs()Returns the value of thecreatedAtNsrecord component.- Returns:
- the value of the
createdAtNsrecord component
-
ttl
Returns the value of thettlrecord component.- Returns:
- the value of the
ttlrecord component
-