Record Class PartitionMigrationPipeline.MigratedEntry
java.lang.Object
java.lang.Record
com.loomcache.server.cluster.PartitionMigrationPipeline.MigratedEntry
- Enclosing class:
PartitionMigrationPipeline
public static record PartitionMigrationPipeline.MigratedEntry(@Nullable String value, long expirationTimeMillis, long sourceExpirationToken, boolean tombstone)
extends Record
Value plus absolute expiry metadata for a migrated map entry.
Long.MAX_VALUE means no TTL. Positive epoch millis values
preserve the source node's expiry deadline across the migration wire.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMigratedEntry(@Nullable String value, long expirationTimeMillis, long sourceExpirationToken, boolean tombstone) Creates an instance of aMigratedEntryrecord class.MigratedEntry(String value, long expirationTimeMillis) MigratedEntry(String value, long expirationTimeMillis, long sourceExpirationToken) -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.booleanisExpiredAt(long nowMillis) longReturns the value of thesourceExpirationTokenrecord component.booleanReturns the value of thetombstonerecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringvalue()Returns the value of thevaluerecord component.withoutTtl(String value)
-
Constructor Details
-
MigratedEntry
public MigratedEntry(@Nullable String value, long expirationTimeMillis, long sourceExpirationToken, boolean tombstone) Creates an instance of aMigratedEntryrecord class.- Parameters:
value- the value for thevaluerecord componentexpirationTimeMillis- the value for theexpirationTimeMillisrecord componentsourceExpirationToken- the value for thesourceExpirationTokenrecord componenttombstone- the value for thetombstonerecord component
-
MigratedEntry
-
MigratedEntry
-
-
Method Details
-
withoutTtl
-
tombstoneEntry
-
isExpiredAt
public boolean isExpiredAt(long nowMillis) -
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. -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
expirationTimeMillis
public long expirationTimeMillis()Returns the value of theexpirationTimeMillisrecord component.- Returns:
- the value of the
expirationTimeMillisrecord component
-
sourceExpirationToken
public long sourceExpirationToken()Returns the value of thesourceExpirationTokenrecord component.- Returns:
- the value of the
sourceExpirationTokenrecord component
-
tombstone
public boolean tombstone()Returns the value of thetombstonerecord component.- Returns:
- the value of the
tombstonerecord component
-