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 Details

    • MigratedEntry

      public MigratedEntry(@Nullable String value, long expirationTimeMillis, long sourceExpirationToken, boolean tombstone)
      Creates an instance of a MigratedEntry record class.
      Parameters:
      value - the value for the value record component
      expirationTimeMillis - the value for the expirationTimeMillis record component
      sourceExpirationToken - the value for the sourceExpirationToken record component
      tombstone - the value for the tombstone record component
    • MigratedEntry

      public MigratedEntry(String value, long expirationTimeMillis)
    • MigratedEntry

      public MigratedEntry(String value, long expirationTimeMillis, long sourceExpirationToken)
  • Method Details

    • withoutTtl

      public static PartitionMigrationPipeline.MigratedEntry withoutTtl(String value)
    • tombstoneEntry

      public static PartitionMigrationPipeline.MigratedEntry tombstoneEntry()
    • isExpiredAt

      public boolean isExpiredAt(long nowMillis)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • value

      public @Nullable String value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • expirationTimeMillis

      public long expirationTimeMillis()
      Returns the value of the expirationTimeMillis record component.
      Returns:
      the value of the expirationTimeMillis record component
    • sourceExpirationToken

      public long sourceExpirationToken()
      Returns the value of the sourceExpirationToken record component.
      Returns:
      the value of the sourceExpirationToken record component
    • tombstone

      public boolean tombstone()
      Returns the value of the tombstone record component.
      Returns:
      the value of the tombstone record component