public class ReadCommittedEntry extends Object implements MVCCEntry
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ReadCommittedEntry.Flags |
| Modifier and Type | Field and Description |
|---|---|
protected byte |
flags |
protected Object |
key |
protected Metadata |
metadata |
protected Object |
oldValue |
protected Object |
value |
| Constructor and Description |
|---|
ReadCommittedEntry(Object key,
Object value,
Metadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
ReadCommittedEntry |
clone() |
void |
commit(DataContainer container,
Metadata providedMetadata)
Commits changes
|
void |
copyForUpdate()
Makes internal copies of the entry for updates
|
void |
copyStateFlagsFrom(StateChangingEntry other) |
Object |
getKey()
Retrieves the key to this entry
|
long |
getLifespan() |
long |
getMaxIdle() |
Metadata |
getMetadata()
Get metadata of this cache entry.
|
byte |
getStateFlags() |
Object |
getValue()
Retrieves the value of this entry
|
boolean |
isChanged() |
boolean |
isCreated() |
boolean |
isEvicted() |
boolean |
isExpired()
Returns whether this entry was marked as being expired or not
|
protected boolean |
isFlagSet(ReadCommittedEntry.Flags flag)
Tests whether a flag is set.
|
boolean |
isLoaded()
Deprecated.
|
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 |
setExpired(boolean expired)
Marks this entry as being expired.
|
protected void |
setFlag(boolean enable,
ReadCommittedEntry.Flags flag) |
protected void |
setFlag(ReadCommittedEntry.Flags flag)
Utility method that sets the value of the given flag to true.
|
void |
setLoaded(boolean loaded)
Deprecated.
|
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
void |
setRemoved(boolean removed) |
void |
setSkipLookup(boolean skipLookup)
|
void |
setValid(boolean valid) |
Object |
setValue(Object value)
Sets the value of the entry, returning the previous value
|
boolean |
skipLookup() |
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.
|
protected void |
unsetFlag(ReadCommittedEntry.Flags flag)
Utility method that sets the value of the flag to false.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopyForUpdatecomparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCodeprotected Object key
protected Object value
protected Object oldValue
protected byte flags
protected Metadata metadata
public byte getStateFlags()
getStateFlags in interface StateChangingEntrypublic void copyStateFlagsFrom(StateChangingEntry other)
copyStateFlagsFrom in interface StateChangingEntryprotected final boolean isFlagSet(ReadCommittedEntry.Flags flag)
flag - flag to testprotected final void setFlag(ReadCommittedEntry.Flags flag)
flag - flag to setprotected final void unsetFlag(ReadCommittedEntry.Flags flag)
flag - flag to unsetpublic final long getLifespan()
getLifespan in interface CacheEntrypublic final long getMaxIdle()
getMaxIdle in interface CacheEntrypublic final Object getKey()
CacheEntrygetKey in interface Map.EntrygetKey in interface CacheEntrypublic final Object getValue()
CacheEntrygetValue in interface Map.EntrygetValue in interface CacheEntrypublic final Object setValue(Object value)
CacheEntrysetValue in interface Map.EntrysetValue in interface CacheEntryvalue - value to setpublic boolean isNull()
CacheEntryisNull in interface CacheEntrypublic void copyForUpdate()
MVCCEntrycopyForUpdate in interface MVCCEntrypublic final void commit(DataContainer container, Metadata providedMetadata)
CacheEntrycommit in interface CacheEntrycontainer - data container to commit topublic final void rollback()
CacheEntryrollback in interface CacheEntrypublic final boolean isChanged()
isChanged in interface CacheEntrypublic final void setChanged(boolean changed)
setChanged in interface CacheEntrysetChanged in interface MVCCEntrypublic void setSkipLookup(boolean skipLookup)
CacheEntrysetSkipLookup in interface CacheEntrypublic boolean skipLookup()
skipLookup in interface CacheEntrytrue if the value must not be fetch from an external sourcepublic boolean isValid()
isValid in interface CacheEntrypublic final void setValid(boolean valid)
setValid in interface CacheEntrypublic Metadata getMetadata()
MetadataAwaregetMetadata in interface MetadataAwarepublic void setMetadata(Metadata metadata)
MetadataAwaresetMetadata in interface MetadataAwaremetadata - to apply to the cache entrypublic final boolean isCreated()
isCreated in interface CacheEntrypublic final void setCreated(boolean created)
setCreated in interface CacheEntrypublic boolean isRemoved()
isRemoved in interface CacheEntrypublic boolean isEvicted()
isEvicted in interface CacheEntrypublic boolean isExpired()
MVCCEntrypublic final void setRemoved(boolean removed)
setRemoved in interface CacheEntrypublic void setEvicted(boolean evicted)
setEvicted in interface CacheEntrypublic void setExpired(boolean expired)
MVCCEntrysetExpired in interface MVCCEntryexpired - whether or not this entry should be expired@Deprecated public boolean isLoaded()
isLoaded in interface CacheEntry@Deprecated public void setLoaded(boolean loaded)
setLoaded in interface CacheEntryprotected final void setFlag(boolean enable,
ReadCommittedEntry.Flags flag)
public ReadCommittedEntry clone()
clone in interface CacheEntryclone in class Objectpublic boolean undelete(boolean doUndelete)
CacheEntryundelete in interface CacheEntryCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.