Class MetadataMortalCacheValue
- java.lang.Object
-
- org.infinispan.container.entries.ImmortalCacheValue
-
- org.infinispan.container.entries.metadata.MetadataMortalCacheValue
-
- All Implemented Interfaces:
Cloneable,InternalCacheValue,MetadataAware
- Direct Known Subclasses:
MetadataTransientMortalCacheValue
public class MetadataMortalCacheValue extends ImmortalCacheValue implements MetadataAware
A mortal cache value, to correspond withMetadataMortalCacheEntry- Since:
- 5.1
- Author:
- Galder ZamarreƱo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadataMortalCacheValue.Externalizer
-
Field Summary
-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
value
-
-
Constructor Summary
Constructors Constructor Description MetadataMortalCacheValue(Object value, Metadata metadata, long created)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExpire()longgetCreated()longgetExpiryTime()longgetLifespan()MetadatagetMetadata()Get metadata of this cache entry.booleanisExpired()booleanisExpired(long now)voidsetMetadata(Metadata metadata)Set the metadata in the cache entry.InternalCacheEntrytoInternalCacheEntry(Object key)-
Methods inherited from class org.infinispan.container.entries.ImmortalCacheValue
clone, equals, getLastUsed, getMaxIdle, 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.InternalCacheValue
isMaxIdleExpirable
-
-
-
-
Method Detail
-
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(Object key)
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue- Overrides:
toInternalCacheEntryin classImmortalCacheValue
-
getMetadata
public Metadata getMetadata()
Description copied from interface:MetadataAwareGet metadata of this cache entry.- Specified by:
getMetadatain interfaceInternalCacheValue- Specified by:
getMetadatain interfaceMetadataAware- Overrides:
getMetadatain classImmortalCacheValue- Returns:
- a Metadata instance
-
setMetadata
public void setMetadata(Metadata metadata)
Description copied from interface:MetadataAwareSet the metadata in the cache entry.- Specified by:
setMetadatain interfaceMetadataAware- Parameters:
metadata- to apply to the cache entry
-
getCreated
public final long getCreated()
- Specified by:
getCreatedin interfaceInternalCacheValue- Overrides:
getCreatedin classImmortalCacheValue- Returns:
- timestamp when the entry was created
-
getLifespan
public final long getLifespan()
- Specified by:
getLifespanin interfaceInternalCacheValue- Overrides:
getLifespanin classImmortalCacheValue- Returns:
- lifespan of the value
-
isExpired
public boolean isExpired(long now)
- Specified by:
isExpiredin interfaceInternalCacheValue- Overrides:
isExpiredin classImmortalCacheValue- Parameters:
now- the current time as expressed bySystem.currentTimeMillis()- Returns:
- true if the entry has expired; false otherwise
-
isExpired
public boolean isExpired()
- Specified by:
isExpiredin interfaceInternalCacheValue- Overrides:
isExpiredin classImmortalCacheValue- Returns:
- true if the entry has expired; false otherwise
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTimein interfaceInternalCacheValue- Overrides:
getExpiryTimein classImmortalCacheValue
-
canExpire
public final boolean canExpire()
- Specified by:
canExpirein interfaceInternalCacheValue- Overrides:
canExpirein classImmortalCacheValue- Returns:
- true if the entry can expire, false otherwise
-
-