public abstract class AbstractInternalCacheEntry extends Object implements InternalCacheEntry
Modifier | Constructor and Description |
---|---|
protected |
AbstractInternalCacheEntry() |
protected |
AbstractInternalCacheEntry(Object key) |
Modifier and Type | Method and Description |
---|---|
AbstractInternalCacheEntry |
clone() |
void |
commit(DataContainer container,
Metadata metadata)
Commits changes
|
Object |
getKey()
Retrieves the key to this entry
|
Metadata |
getMetadata()
Get metadata of this cache entry.
|
boolean |
isChanged() |
boolean |
isCreated() |
boolean |
isEvicted() |
boolean |
isLoaded() |
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 |
setChanged(boolean changed) |
void |
setCreated(boolean created) |
void |
setEvicted(boolean evicted) |
void |
setLoaded(boolean loaded) |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
void |
setRemoved(boolean removed) |
void |
setSkipRemoteGet(boolean skipRemoteGet)
|
void |
setValid(boolean valid) |
boolean |
skipRemoteGet() |
String |
toString() |
boolean |
undelete(boolean doUndelete)
If the entry is marked as removed and doUndelete==true then the "valid" flag is set to true and "removed"
flag is set to false.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canExpire, getCreated, getExpiryTime, getLastUsed, isExpired, isExpired, reincarnate, reincarnate, toInternalCacheValue, touch, touch
getLifespan, getMaxIdle, getValue, setValue
protected Object key
protected AbstractInternalCacheEntry()
protected AbstractInternalCacheEntry(Object key)
public final void commit(DataContainer container, Metadata metadata)
CacheEntry
commit
in interface CacheEntry
container
- data container to commit topublic final void rollback()
CacheEntry
rollback
in interface CacheEntry
public void setChanged(boolean changed)
setChanged
in interface CacheEntry
public final void setCreated(boolean created)
setCreated
in interface CacheEntry
public final void setRemoved(boolean removed)
setRemoved
in interface CacheEntry
public final void setEvicted(boolean evicted)
setEvicted
in interface CacheEntry
public final void setValid(boolean valid)
setValid
in interface CacheEntry
public void setLoaded(boolean loaded)
setLoaded
in interface CacheEntry
public void setSkipRemoteGet(boolean skipRemoteGet)
CacheEntry
setSkipRemoteGet
in interface CacheEntry
public final boolean isNull()
CacheEntry
isNull
in interface CacheEntry
public final boolean isChanged()
isChanged
in interface CacheEntry
public final boolean isCreated()
isCreated
in interface CacheEntry
public final boolean isRemoved()
isRemoved
in interface CacheEntry
public final boolean isEvicted()
isEvicted
in interface CacheEntry
public final boolean isValid()
isValid
in interface CacheEntry
public boolean isLoaded()
isLoaded
in interface CacheEntry
public boolean skipRemoteGet()
skipRemoteGet
in interface CacheEntry
true
if the value must not be fetch from a remote node.public boolean undelete(boolean doUndelete)
CacheEntry
undelete
in interface CacheEntry
public Metadata getMetadata()
MetadataAware
getMetadata
in interface MetadataAware
public void setMetadata(Metadata metadata)
MetadataAware
setMetadata
in interface MetadataAware
metadata
- to apply to the cache entrypublic final Object getKey()
CacheEntry
public AbstractInternalCacheEntry clone()
clone
in interface InternalCacheEntry
clone
in class Object
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.