Class EntryLoader.MetadataAwareValue<V>

Type Parameters:
V - the type of the value object
Enclosing interface:

public static class EntryLoader.MetadataAwareValue<V> extends Object
Represents a value with an expiration time attached to it. Expiration time is optional.
  • Field Details


      public static final long NO_TIME_SET
      Represents no expiration time for a particular value
      See Also:
  • Constructor Details

    • MetadataAwareValue

      public MetadataAwareValue(V value)
      Creates a value without attaching an expiration time
      value - the value
    • MetadataAwareValue

      public MetadataAwareValue(V value, long expirationTime)
      Creates a value and attaches an expiration time to it. See getExpirationTime() for how expiration time is defined.
      value - the value
      expirationTime - expiration time associated with the value
  • Method Details

    • getValue

      public V getValue()
      Returns the value
      the value
    • getExpirationTime

      public long getExpirationTime()
      The expiration date of this entry. The entry is removed from maps after the specified date. This value overrides any expiration time calculated by using ttl and idle time configurations, both per key and per map configurations.
      the difference, measured in milliseconds, between the expiration time and midnight, January 1, 1970 UTC.