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 ofTransientMortalCacheValuethat storesMetadata- Since:
- 5.1
- Author:
- Manik Surtani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetadataTransientMortalCacheValue.Externalizer
-
Field Summary
-
Fields inherited from class org.infinispan.container.entries.ImmortalCacheValue
internalMetadata, value
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMetadataTransientMortalCacheValue(Object value, PrivateMetadata internalMetadata, Metadata metadata, long created, long lastUsed)MetadataTransientMortalCacheValue(Object value, Metadata metadata, long created, long lastUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendFieldsToString(StringBuilder builder)longgetExpiryTime()longgetLastUsed()longgetMaxIdle()booleanisExpired(long now)booleanisMaxIdleExpirable()InternalCacheEntry<?,?>toInternalCacheEntry(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, 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 Detail
-
MetadataTransientMortalCacheValue
public MetadataTransientMortalCacheValue(Object value, Metadata metadata, long created, long lastUsed)
-
MetadataTransientMortalCacheValue
protected MetadataTransientMortalCacheValue(Object value, PrivateMetadata internalMetadata, Metadata metadata, long created, long lastUsed)
-
-
Method Detail
-
toInternalCacheEntry
public InternalCacheEntry<?,?> toInternalCacheEntry(Object key)
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue- Overrides:
toInternalCacheEntryin classMetadataMortalCacheValue
-
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 boolean isExpired(long now)
- Specified by:
isExpiredin interfaceInternalCacheValue- Overrides:
isExpiredin 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:
isMaxIdleExpirablein interfaceInternalCacheValue- Returns:
- true if this entry can expire via max idle, false otherwise
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTimein interfaceInternalCacheValue- Overrides:
getExpiryTimein classMetadataMortalCacheValue
-
appendFieldsToString
protected void appendFieldsToString(StringBuilder builder)
- Overrides:
appendFieldsToStringin classMetadataMortalCacheValue
-
-