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>
Represents a value with an expiration time attached to it.
Expiration time is optional.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Represents no expiration time for a particular value -
Constructor Summary
ConstructorDescriptionMetadataAwareValue
(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
Modifier and TypeMethodDescriptionlong
The expiration date of this entry.getValue()
Returns the value
-
Field Details
-
NO_TIME_SET
public static final long NO_TIME_SETRepresents no expiration time for a particular value- See Also:
-
-
Constructor Details
-
MetadataAwareValue
Creates a value without attaching an expiration time- Parameters:
value
- the value
-
MetadataAwareValue
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 Details
-
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.
-