Package com.hazelcast.map
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 java.lang.Object
Represents a value with an expiration time attached to it. Expiration time is optional.
-
-
Field Summary
Fields Modifier and Type Field Description static long
NO_TIME_SET
Represents no expiration time for a particular value
-
Constructor Summary
Constructors Constructor Description MetadataAwareValue(V value)
Creates a value without attaching an expiration timeMetadataAwareValue(V value, long expirationTime)
Creates a value and attaches an expiration time to it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExpirationTime()
The expiration date of this entry.V
getValue()
Returns the value
-
-
-
Field Detail
-
NO_TIME_SET
public static final long NO_TIME_SET
Represents no expiration time for a particular value- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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. SeegetExpirationTime()
for how expiration time is defined.- Parameters:
value
- the valueexpirationTime
- expiration time associated with the value
-
-
Method Detail
-
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.
-
-