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 long |
created |
protected short |
flags |
protected PrivateMetadata |
internalMetadata |
protected Object |
key |
protected long |
lastUsed |
protected Metadata |
metadata |
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)
Commits changes
|
CompletionStage<Void> |
commit(int segment,
InternalDataContainer container) |
long |
getCreated() |
PrivateMetadata |
getInternalMetadata() |
Object |
getKey()
Retrieves the key to this entry
|
long |
getLastUsed() |
long |
getLifespan() |
long |
getMaxIdle() |
Metadata |
getMetadata()
Get metadata of this cache entry.
|
Object |
getValue()
Retrieves the value of this entry
|
boolean |
isChanged() |
boolean |
isCommitted() |
boolean |
isCreated() |
boolean |
isEvicted() |
boolean |
isExpired()
Returns whether this entry was marked as being expired or not
|
boolean |
isLoaded() |
boolean |
isNull()
Tests whether the entry represents a null value, typically used for repeatable read.
|
boolean |
isRemoved() |
boolean |
isSkipSharedStore() |
void |
resetCurrentValue()
Reset the current value of the entry to the value before the commmand was executed the first time.
|
void |
setChanged(boolean changed) |
void |
setCommitted()
Mark this context-entry as already committed to the
DataContainer. |
void |
setCreated(boolean created) |
void |
setCreated(long created) |
void |
setEvicted(boolean evicted) |
void |
setExpired(boolean expired)
Marks this entry as being expired.
|
protected void |
setFlag(ReadCommittedEntry.Flags flag)
Utility method that sets the value of the given flag to true.
|
void |
setInternalMetadata(PrivateMetadata metadata) |
void |
setLastUsed(long lastUsed) |
void |
setLoaded(boolean loaded) |
void |
setMetadata(Metadata metadata)
Set the metadata in the cache entry.
|
void |
setRemoved(boolean removed) |
void |
setSkipLookup(boolean skipLookup)
|
void |
setSkipSharedStore() |
Object |
setValue(Object value)
Sets the value of the entry, returning the previous value
|
boolean |
skipLookup() |
String |
toString() |
void |
updatePreviousValue()
Update the previous value of the entry - set it to current value.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcomparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCodeprotected Object key
protected Object value
protected long created
protected long lastUsed
protected short flags
protected Metadata metadata
protected PrivateMetadata internalMetadata
protected final void setFlag(ReadCommittedEntry.Flags flag)
flag - flag to setpublic 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 boolean isNull()
CacheEntryisNull in interface CacheEntrypublic final void commit(DataContainer container)
CacheEntrycommit in interface CacheEntrycontainer - data container to commit topublic final CompletionStage<Void> commit(int segment, InternalDataContainer container)
public 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 long getCreated()
getCreated in interface CacheEntrypublic long getLastUsed()
getLastUsed in interface CacheEntrypublic Object setValue(Object value)
CacheEntrysetValue in interface Map.EntrysetValue in interface CacheEntryvalue - value to setpublic 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 void setCommitted()
MVCCEntryDataContainer.setCommitted in interface MVCCEntrypublic boolean isCommitted()
isCommitted in interface MVCCEntryDataContainerpublic boolean isLoaded()
public boolean isSkipSharedStore()
isSkipSharedStore in interface MVCCEntrypublic void resetCurrentValue()
MVCCEntryresetCurrentValue in interface MVCCEntrypublic void updatePreviousValue()
MVCCEntryupdatePreviousValue in interface 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 expiredpublic void setSkipSharedStore()
setSkipSharedStore in interface MVCCEntrypublic ReadCommittedEntry clone()
public void setCreated(long created)
setCreated in interface CacheEntrypublic void setLastUsed(long lastUsed)
setLastUsed in interface CacheEntrypublic PrivateMetadata getInternalMetadata()
getInternalMetadata in interface CacheEntrypublic void setInternalMetadata(PrivateMetadata metadata)
setInternalMetadata in interface CacheEntryCopyright © 2022 JBoss by Red Hat. All rights reserved.