org.infinispan.container.entries
Class ImmortalCacheValue

java.lang.Object
  extended by org.infinispan.container.entries.ImmortalCacheValue
All Implemented Interfaces:
Cloneable, InternalCacheValue
Direct Known Subclasses:
MortalCacheValue, TransientCacheValue

public class ImmortalCacheValue
extends Object
implements InternalCacheValue, Cloneable

An immortal cache value, to correspond with ImmortalCacheEntry

Since:
4.0
Author:
Manik Surtani

Nested Class Summary
static class ImmortalCacheValue.Externalizer
           
 
Method Summary
 boolean canExpire()
           
 ImmortalCacheValue clone()
           
 boolean equals(Object o)
           
 long getCreated()
           
 long getLastUsed()
           
 long getLifespan()
           
 long getMaxIdle()
           
 Object getValue()
           
 int hashCode()
           
 boolean isExpired()
           
 Object setValue(Object value)
           
 InternalCacheEntry toInternalCacheEntry(Object key)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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()
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

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.