Class EntryLoader.MetadataAwareValue<V>

java.lang.Object
com.hazelcast.map.EntryLoader.MetadataAwareValue<V>
Type Parameters:
V - the type of the value object
Enclosing interface:
EntryLoader<K,V>

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

    • NO_TIME_SET

      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
      Parameters:
      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.
      Parameters:
      value - the value
      expirationTime - expiration time associated with the value
  • Method Details

    • getValue

      public V getValue()
      Returns the value
      Returns:
      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.
      Returns:
      the difference, measured in milliseconds, between the expiration time and midnight, January 1, 1970 UTC.