org.infinispan.container.entries
Class AbstractInternalCacheEntry

java.lang.Object
  extended by org.infinispan.container.entries.AbstractInternalCacheEntry
All Implemented Interfaces:
CacheEntry, InternalCacheEntry
Direct Known Subclasses:
ImmortalCacheEntry, MortalCacheEntry, TransientCacheEntry

public abstract class AbstractInternalCacheEntry
extends Object
implements InternalCacheEntry

An abstract internal cache entry that is typically stored in the data container

Since:
4.0
Author:
Manik Surtani

Method Summary
 void commit(DataContainer container)
          Commits changes
 Object getKey()
          Retrieves the key to this entry
 Object getValue()
          Retrieves the value of this entry
 boolean isChanged()
           
 boolean isCreated()
           
 boolean isNull()
          Tests whether the entry represents a null value, typically used for repeatable read.
 boolean isRemoved()
           
 boolean isValid()
           
 void rollback()
          Rolls back changes
 void setCreated(boolean created)
           
 void setRemoved(boolean removed)
           
 void setValid(boolean valid)
           
 Object setValue(Object value)
          Sets the value of the entry, returing the previous value
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.infinispan.container.entries.InternalCacheEntry
canExpire, getCreated, getExpiryTime, getLastUsed, isExpired, setLifespan, setMaxIdle, toInternalCacheValue, touch
 
Methods inherited from interface org.infinispan.container.entries.CacheEntry
getLifespan, getMaxIdle
 

Method Detail

setValue

public final Object setValue(Object value)
Description copied from interface: CacheEntry
Sets the value of the entry, returing the previous value

Specified by:
setValue in interface CacheEntry
Parameters:
value - value to set
Returns:
previous value

commit

public final void commit(DataContainer container)
Description copied from interface: CacheEntry
Commits changes

Specified by:
commit in interface CacheEntry
Parameters:
container - data container to commit to

rollback

public final void rollback()
Description copied from interface: CacheEntry
Rolls back changes

Specified by:
rollback in interface CacheEntry

setCreated

public final void setCreated(boolean created)
Specified by:
setCreated in interface CacheEntry

setRemoved

public final void setRemoved(boolean removed)
Specified by:
setRemoved in interface CacheEntry

setValid

public final void setValid(boolean valid)
Specified by:
setValid in interface CacheEntry

isNull

public final boolean isNull()
Description copied from interface: CacheEntry
Tests whether the entry represents a null value, typically used for repeatable read.

Specified by:
isNull in interface CacheEntry
Returns:
true if this represents a null, false otherwise.

isChanged

public final boolean isChanged()
Specified by:
isChanged in interface CacheEntry
Returns:
true if this entry has changed since being read from the container, false otherwise.

isCreated

public final boolean isCreated()
Specified by:
isCreated in interface CacheEntry
Returns:
true if this entry has been newly created, false otherwise.

isRemoved

public final boolean isRemoved()
Specified by:
isRemoved in interface CacheEntry
Returns:
true if this entry has been removed since being read from the container, false otherwise.

isValid

public final boolean isValid()
Specified by:
isValid in interface CacheEntry
Returns:
true if this entry is still valid, false otherwise.

getKey

public final Object getKey()
Description copied from interface: CacheEntry
Retrieves the key to this entry

Specified by:
getKey in interface CacheEntry
Returns:
a key

getValue

public final Object getValue()
Description copied from interface: CacheEntry
Retrieves the value of this entry

Specified by:
getValue in interface CacheEntry
Returns:
the value of the entry

toString

public String toString()
Overrides:
toString in class Object


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