Record Class AccessTracker.AccessStats
java.lang.Object
java.lang.Record
com.loomcache.server.cache.AccessTracker.AccessStats
- Enclosing class:
AccessTracker
-
Constructor Summary
ConstructorsConstructorDescriptionAccessStats(String key, long accessCount, long lastAccessedAt) Creates an instance of aAccessStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theaccessCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.longReturns the value of thelastAccessedAtrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AccessStats
Creates an instance of aAccessStatsrecord class.- Parameters:
key- the value for thekeyrecord componentaccessCount- the value for theaccessCountrecord componentlastAccessedAt- the value for thelastAccessedAtrecord 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. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
accessCount
public long accessCount()Returns the value of theaccessCountrecord component.- Returns:
- the value of the
accessCountrecord component
-
lastAccessedAt
public long lastAccessedAt()Returns the value of thelastAccessedAtrecord component.- Returns:
- the value of the
lastAccessedAtrecord component
-