Record Class WanPublisher.WanEvent
java.lang.Object
java.lang.Record
com.loomcache.server.wan.WanPublisher.WanEvent
- Record Components:
sequence- monotonically increasing event sequence numbermapName- the target data structure namekey- the key being changedvalue- the new value (null for DELETE)changeType- the type of changetimestampMillis- epoch millis when the change occurredhitCount- successful reads recorded for the key at publish timelastAccessTimeMillis- epoch millis of the last successful read at publish timeexpirationTimeMillis- epoch millis when the key expires, orLong.MAX_VALUEwhen the key does not expire
- All Implemented Interfaces:
Serializable
- Enclosing class:
WanPublisher
public static record WanPublisher.WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount, long lastAccessTimeMillis, long expirationTimeMillis)
extends Record
implements Serializable
A single WAN replication event.
- Since:
- 2.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis) WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount) WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount, long lastAccessTimeMillis) WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount, long lastAccessTimeMillis, long expirationTimeMillis) Creates an instance of aWanEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull WanReplicationManager.ChangeTypeReturns the value of thechangeTyperecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpirationTimeMillisrecord component.final inthashCode()Returns a hash code value for this object.longhitCount()Returns the value of thehitCountrecord component.@NonNull Stringkey()Returns the value of thekeyrecord component.longReturns the value of thelastAccessTimeMillisrecord component.@NonNull StringmapName()Returns the value of themapNamerecord component.longsequence()Returns the value of thesequencerecord component.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.byte @Nullable []value()Returns the value of thevaluerecord component.
-
Constructor Details
-
WanEvent
public WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis) -
WanEvent
public WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount) -
WanEvent
public WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount, long lastAccessTimeMillis) -
WanEvent
public WanEvent(long sequence, @NonNull String mapName, @NonNull String key, byte @Nullable [] value, @NonNull WanReplicationManager.ChangeType changeType, long timestampMillis, long hitCount, long lastAccessTimeMillis, long expirationTimeMillis) Creates an instance of aWanEventrecord class.- Parameters:
sequence- the value for thesequencerecord componentmapName- the value for themapNamerecord componentkey- the value for thekeyrecord componentvalue- the value for thevaluerecord componentchangeType- the value for thechangeTyperecord componenttimestampMillis- the value for thetimestampMillisrecord componenthitCount- the value for thehitCountrecord componentlastAccessTimeMillis- the value for thelastAccessTimeMillisrecord componentexpirationTimeMillis- the value for theexpirationTimeMillisrecord 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. -
sequence
-
mapName
-
key
-
value
-
changeType
Returns the value of thechangeTyperecord component.- Returns:
- the value of the
changeTyperecord component
-
timestampMillis
public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-
hitCount
-
lastAccessTimeMillis
public long lastAccessTimeMillis()Returns the value of thelastAccessTimeMillisrecord component.- Returns:
- the value of the
lastAccessTimeMillisrecord component
-
expirationTimeMillis
public long expirationTimeMillis()Returns the value of theexpirationTimeMillisrecord component.- Returns:
- the value of the
expirationTimeMillisrecord component
-