Class MetadataTransientCacheValue
- java.lang.Object
-
- org.infinispan.container.entries.ImmortalCacheValue
-
- org.infinispan.container.entries.metadata.MetadataTransientCacheValue
-
- All Implemented Interfaces:
Cloneable,InternalCacheValue,MetadataAware
public class MetadataTransientCacheValue extends ImmortalCacheValue implements MetadataAware
A transient cache value, to correspond withTransientCacheEntrywhich isMetadataAware- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadataTransientCacheValue.Externalizer
-
Field Summary
-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
value
-
-
Constructor Summary
Constructors Constructor Description MetadataTransientCacheValue(Object value, Metadata metadata, long lastUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExpire()longgetExpiryTime()longgetLastUsed()longgetMaxIdle()MetadatagetMetadata()Get metadata of this cache entry.booleanisExpired()booleanisExpired(long now)booleanisMaxIdleExpirable()voidsetMetadata(Metadata metadata)Set the metadata in the cache entry.InternalCacheEntrytoInternalCacheEntry(Object key)-
Methods inherited from class org.infinispan.container.entries.ImmortalCacheValue
clone, equals, getCreated, getLifespan, getValue, hashCode, setValue, toString
-
-
-
-
Method Detail
-
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(Object key)
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue- Overrides:
toInternalCacheEntryin classImmortalCacheValue
-
getMaxIdle
public long getMaxIdle()
- Specified by:
getMaxIdlein interfaceInternalCacheValue- Overrides:
getMaxIdlein classImmortalCacheValue- Returns:
- max idle time allowed
-
getLastUsed
public long getLastUsed()
- Specified by:
getLastUsedin interfaceInternalCacheValue- Overrides:
getLastUsedin classImmortalCacheValue- Returns:
- timestamp when the entry was last used
-
isExpired
public final 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 final boolean isExpired()
- Specified by:
isExpiredin interfaceInternalCacheValue- Overrides:
isExpiredin classImmortalCacheValue- Returns:
- true if the entry has expired; false otherwise
-
canExpire
public boolean canExpire()
- Specified by:
canExpirein interfaceInternalCacheValue- Overrides:
canExpirein classImmortalCacheValue- Returns:
- true if the entry can expire, false otherwise
-
isMaxIdleExpirable
public boolean isMaxIdleExpirable()
- Specified by:
isMaxIdleExpirablein interfaceInternalCacheValue- Returns:
- true if this entry can expire via max idle, false otherwise
-
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
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTimein interfaceInternalCacheValue- Overrides:
getExpiryTimein classImmortalCacheValue
-
-