Class MetadataTransientMortalCacheValue
java.lang.Object
org.infinispan.container.entries.ImmortalCacheValue
org.infinispan.container.entries.metadata.MetadataMortalCacheValue
org.infinispan.container.entries.metadata.MetadataTransientMortalCacheValue
- All Implemented Interfaces:
Cloneable
,InternalCacheValue
,MetadataAware
public class MetadataTransientMortalCacheValue
extends MetadataMortalCacheValue
implements MetadataAware
A form of
TransientMortalCacheValue
that stores Metadata
- Since:
- 5.1
- Author:
- Manik Surtani
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
internalMetadata, value
-
Constructor Summary
ModifierConstructorDescriptionprotected
MetadataTransientMortalCacheValue
(Object value, PrivateMetadata internalMetadata, Metadata metadata, long created, long lastUsed) MetadataTransientMortalCacheValue
(Object value, Metadata metadata, long created, long lastUsed) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendFieldsToString
(StringBuilder builder) long
long
long
boolean
isExpired
(long now) boolean
InternalCacheEntry<?,
?> Methods inherited from class org.infinispan.container.entries.metadata.MetadataMortalCacheValue
canExpire, getCreated, getLifespan, getMetadata, setMetadata
Methods inherited from class org.infinispan.container.entries.ImmortalCacheValue
clone, equals, getInternalMetadata, getValue, hashCode, setInternalMetadata, setValue, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.container.entries.metadata.MetadataAware
getMetadata, setMetadata
-
Constructor Details
-
MetadataTransientMortalCacheValue
-
MetadataTransientMortalCacheValue
protected MetadataTransientMortalCacheValue(Object value, PrivateMetadata internalMetadata, Metadata metadata, long created, long lastUsed)
-
-
Method Details
-
toInternalCacheEntry
- Specified by:
toInternalCacheEntry
in interfaceInternalCacheValue
- Overrides:
toInternalCacheEntry
in classMetadataMortalCacheValue
-
getMaxIdle
public long getMaxIdle()- Specified by:
getMaxIdle
in interfaceInternalCacheValue
- Overrides:
getMaxIdle
in classImmortalCacheValue
- Returns:
- max idle time allowed
-
getLastUsed
public long getLastUsed()- Specified by:
getLastUsed
in interfaceInternalCacheValue
- Overrides:
getLastUsed
in classImmortalCacheValue
- Returns:
- timestamp when the entry was last used
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpired
in interfaceInternalCacheValue
- Overrides:
isExpired
in classMetadataMortalCacheValue
- Parameters:
now
- the current time as expressed bySystem.currentTimeMillis()
- Returns:
- true if the entry has expired; false otherwise
-
isMaxIdleExpirable
public boolean isMaxIdleExpirable()- Specified by:
isMaxIdleExpirable
in interfaceInternalCacheValue
- Returns:
- true if this entry can expire via max idle, false otherwise
-
getExpiryTime
public long getExpiryTime()- Specified by:
getExpiryTime
in interfaceInternalCacheValue
- Overrides:
getExpiryTime
in classMetadataMortalCacheValue
-
appendFieldsToString
- Overrides:
appendFieldsToString
in classMetadataMortalCacheValue
-