org.infinispan.container.entries
Class ImmortalCacheValue
java.lang.Object
org.infinispan.container.entries.ImmortalCacheValue
- All Implemented Interfaces:
- Cloneable, InternalCacheValue
- Direct Known Subclasses:
- MortalCacheValue, TransientCacheValue, VersionedImmortalCacheValue
public class ImmortalCacheValue
- extends Object
- implements InternalCacheValue, Cloneable
An immortal cache value, to correspond with ImmortalCacheEntry
- Since:
- 4.0
- Author:
- Manik Surtani
value
public Object value
ImmortalCacheValue
public ImmortalCacheValue(Object value)
toInternalCacheEntry
public InternalCacheEntry toInternalCacheEntry(Object key)
- Specified by:
toInternalCacheEntry
in interface InternalCacheValue
setValue
public final Object setValue(Object value)
getValue
public Object getValue()
- Specified by:
getValue
in interface InternalCacheValue
- Returns:
- the value represented by this internal wrapper
isExpired
public boolean isExpired(long now)
- Specified by:
isExpired
in interface InternalCacheValue
- Parameters:
now
- the current time as expressed by System.currentTimeMillis()
- Returns:
- true if the entry has expired; false otherwise
isExpired
public boolean isExpired()
- Specified by:
isExpired
in interface InternalCacheValue
- Returns:
- true if the entry has expired; false otherwise
canExpire
public boolean canExpire()
- Specified by:
canExpire
in interface InternalCacheValue
- Returns:
- true if the entry can expire, false otherwise
getCreated
public long getCreated()
- Specified by:
getCreated
in interface InternalCacheValue
- Returns:
- timestamp when the entry was created
getLastUsed
public long getLastUsed()
- Specified by:
getLastUsed
in interface InternalCacheValue
- Returns:
- timestamp when the entry was last used
getLifespan
public long getLifespan()
- Specified by:
getLifespan
in interface InternalCacheValue
- Returns:
- lifespan of the value
getMaxIdle
public long getMaxIdle()
- Specified by:
getMaxIdle
in interface InternalCacheValue
- Returns:
- max idle time allowed
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
clone
public ImmortalCacheValue clone()
- Overrides:
clone
in class Object
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.