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:
java.lang.Cloneable
,InternalCacheValue
,MetadataAware
public class MetadataTransientMortalCacheValue extends MetadataMortalCacheValue implements MetadataAware
A form ofTransientMortalCacheValue
that isVersioned
- Since:
- 5.1
- Author:
- Manik Surtani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetadataTransientMortalCacheValue.Externalizer
-
Field Summary
-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
value
-
-
Constructor Summary
Constructors Constructor Description MetadataTransientMortalCacheValue(java.lang.Object v, Metadata metadata, long created, long lastUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExpiryTime()
long
getLastUsed()
long
getMaxIdle()
boolean
isExpired(long now)
InternalCacheEntry
toInternalCacheEntry(java.lang.Object key)
-
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, getValue, hashCode, 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 Detail
-
MetadataTransientMortalCacheValue
public MetadataTransientMortalCacheValue(java.lang.Object v, Metadata metadata, long created, long lastUsed)
-
-
Method Detail
-
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(java.lang.Object key)
- 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
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTime
in interfaceInternalCacheValue
- Overrides:
getExpiryTime
in classMetadataMortalCacheValue
-
-