org.infinispan.container.entries
Class MortalCacheValue

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

public class MortalCacheValue
extends ImmortalCacheValue

A mortal cache value, to correspond with MortalCacheEntry

Since:
4.0
Author:
Manik Surtani

Nested Class Summary
static class MortalCacheValue.Externalizer
           
 
Method Summary
 boolean canExpire()
           
 MortalCacheValue clone()
           
 boolean equals(Object o)
           
 long getCreated()
           
 long getLifespan()
           
 int hashCode()
           
 boolean isExpired()
           
 void setCreated(long created)
           
 void setLifespan(long lifespan)
           
 InternalCacheEntry toInternalCacheEntry(Object key)
           
 String toString()
           
 
Methods inherited from class org.infinispan.container.entries.ImmortalCacheValue
getLastUsed, getMaxIdle, getValue, setValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCreated

public final long getCreated()
Specified by:
getCreated in interface InternalCacheValue
Overrides:
getCreated in class ImmortalCacheValue
Returns:
timestamp when the entry was created

setCreated

public final void setCreated(long created)

getLifespan

public final long getLifespan()
Specified by:
getLifespan in interface InternalCacheValue
Overrides:
getLifespan in class ImmortalCacheValue
Returns:
lifespan of the value

setLifespan

public final void setLifespan(long lifespan)

isExpired

public boolean isExpired()
Specified by:
isExpired in interface InternalCacheValue
Overrides:
isExpired in class ImmortalCacheValue
Returns:
true if the entry has expired; false otherwise

canExpire

public final boolean canExpire()
Specified by:
canExpire in interface InternalCacheValue
Overrides:
canExpire in class ImmortalCacheValue
Returns:
true if the entry can expire, false otherwise

toInternalCacheEntry

public InternalCacheEntry toInternalCacheEntry(Object key)
Specified by:
toInternalCacheEntry in interface InternalCacheValue
Overrides:
toInternalCacheEntry in class ImmortalCacheValue

equals

public boolean equals(Object o)
Overrides:
equals in class ImmortalCacheValue

hashCode

public int hashCode()
Overrides:
hashCode in class ImmortalCacheValue

toString

public String toString()
Overrides:
toString in class ImmortalCacheValue

clone

public MortalCacheValue clone()
Overrides:
clone in class ImmortalCacheValue

Google Analytics

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