Package org.infinispan.container.entries
Class ImmortalCacheValue
- java.lang.Object
-
- org.infinispan.container.entries.ImmortalCacheValue
-
- All Implemented Interfaces:
Cloneable,InternalCacheValue
- Direct Known Subclasses:
MetadataImmortalCacheValue,MetadataMortalCacheValue,MetadataTransientCacheValue,MortalCacheValue,TransientCacheValue
public class ImmortalCacheValue extends Object implements InternalCacheValue, Cloneable
An immortal cache value, to correspond withImmortalCacheEntry- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmortalCacheValue.Externalizer
-
Constructor Summary
Constructors Constructor Description ImmortalCacheValue(Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExpire()ImmortalCacheValueclone()booleanequals(Object o)longgetCreated()longgetExpiryTime()longgetLastUsed()longgetLifespan()longgetMaxIdle()MetadatagetMetadata()ObjectgetValue()inthashCode()booleanisExpired()booleanisExpired(long now)ObjectsetValue(Object value)InternalCacheEntrytoInternalCacheEntry(Object key)StringtoString()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.container.entries.InternalCacheValue
isMaxIdleExpirable
-
-
-
-
Field Detail
-
value
public Object value
-
-
Constructor Detail
-
ImmortalCacheValue
public ImmortalCacheValue(Object value)
-
-
Method Detail
-
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(Object key)
- Specified by:
toInternalCacheEntryin interfaceInternalCacheValue
-
getValue
public Object getValue()
- Specified by:
getValuein interfaceInternalCacheValue- Returns:
- the value represented by this internal wrapper
-
isExpired
public boolean isExpired(long now)
- Specified by:
isExpiredin interfaceInternalCacheValue- 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- Returns:
- true if the entry has expired; false otherwise
-
canExpire
public boolean canExpire()
- Specified by:
canExpirein interfaceInternalCacheValue- Returns:
- true if the entry can expire, false otherwise
-
getCreated
public long getCreated()
- Specified by:
getCreatedin interfaceInternalCacheValue- Returns:
- timestamp when the entry was created
-
getLastUsed
public long getLastUsed()
- Specified by:
getLastUsedin interfaceInternalCacheValue- Returns:
- timestamp when the entry was last used
-
getLifespan
public long getLifespan()
- Specified by:
getLifespanin interfaceInternalCacheValue- Returns:
- lifespan of the value
-
getMaxIdle
public long getMaxIdle()
- Specified by:
getMaxIdlein interfaceInternalCacheValue- Returns:
- max idle time allowed
-
getExpiryTime
public long getExpiryTime()
- Specified by:
getExpiryTimein interfaceInternalCacheValue
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadatain interfaceInternalCacheValue
-
clone
public ImmortalCacheValue clone()
-
-