Record Class EvictionNotifier.EvictionEvent
java.lang.Object
java.lang.Record
com.loomcache.server.cache.EvictionNotifier.EvictionEvent
- Enclosing class:
EvictionNotifier
public static record EvictionNotifier.EvictionEvent(String mapName, Object key, @Nullable Object value, EvictionNotifier.EvictionReason reason, long sizeBytes, long timestampNanos)
extends Record
Event describing an eviction.
-
Constructor Summary
ConstructorsConstructorDescriptionEvictionEvent(String mapName, Object key, @Nullable Object value, EvictionNotifier.EvictionReason reason, long sizeBytes, long timestampNanos) Creates an instance of aEvictionEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.mapName()Returns the value of themapNamerecord component.reason()Returns the value of thereasonrecord component.longReturns the value of thesizeBytesrecord component.longReturns the value of thetimestampNanosrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Objectvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
EvictionEvent
public EvictionEvent(String mapName, Object key, @Nullable Object value, EvictionNotifier.EvictionReason reason, long sizeBytes, long timestampNanos) Creates an instance of aEvictionEventrecord class.- Parameters:
mapName- the value for themapNamerecord componentkey- the value for thekeyrecord componentvalue- the value for thevaluerecord componentreason- the value for thereasonrecord componentsizeBytes- the value for thesizeBytesrecord componenttimestampNanos- the value for thetimestampNanosrecord 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. -
mapName
Returns the value of themapNamerecord component.- Returns:
- the value of the
mapNamerecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
sizeBytes
public long sizeBytes()Returns the value of thesizeBytesrecord component.- Returns:
- the value of the
sizeBytesrecord component
-
timestampNanos
public long timestampNanos()Returns the value of thetimestampNanosrecord component.- Returns:
- the value of the
timestampNanosrecord component
-