Package org.infinispan.container.entries
Class RepeatableReadEntry
- java.lang.Object
-
- org.infinispan.container.entries.ReadCommittedEntry
-
- org.infinispan.container.entries.RepeatableReadEntry
-
- All Implemented Interfaces:
Cloneable,Map.Entry,CacheEntry,MetadataAware,MVCCEntry,StateChangingEntry
- Direct Known Subclasses:
VersionedRepeatableReadEntry
public class RepeatableReadEntry extends ReadCommittedEntry
An extension ofReadCommittedEntrythat provides Repeatable Read semantics- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.container.entries.ReadCommittedEntry
ReadCommittedEntry.Flags
-
-
Constructor Summary
Constructors Constructor Description RepeatableReadEntry(Object key, Object value, Metadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepeatableReadEntryclone()MetadatagetOldMetadata()ObjectgetOldValue()booleanisRead()Check is this entry as loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check.voidresetCurrentValue()Reset the current value of the entry to the value before the commmand was executed the first time.voidsetRead()Mark that this entry was loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check.voidsetSkipLookup(boolean skipLookup)ObjectsetValue(Object value)Sets the value of the entry, returning the previous valuebooleanskipLookup()voidupdatePreviousValue()Update the previous value of the entry - set it to current value.-
Methods inherited from class org.infinispan.container.entries.ReadCommittedEntry
commit, commit, getCreated, getKey, getLastUsed, getLifespan, getMaxIdle, getMetadata, getValue, isChanged, isCommitted, isCreated, isEvicted, isExpired, isLoaded, isNull, isRemoved, setChanged, setCommitted, setCreated, setCreated, setEvicted, setExpired, setFlag, setLastUsed, setLoaded, setMetadata, setRemoved, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.container.entries.CacheEntry
commit, isValid, rollback, setValid, undelete
-
Methods inherited from interface org.infinispan.container.entries.MVCCEntry
copyForUpdate, copyForUpdate
-
Methods inherited from interface org.infinispan.container.entries.StateChangingEntry
copyStateFlagsFrom, getStateFlags
-
-
-
-
Method Detail
-
setSkipLookup
public void setSkipLookup(boolean skipLookup)
Description copied from interface:CacheEntry- Specified by:
setSkipLookupin interfaceCacheEntry- Overrides:
setSkipLookupin classReadCommittedEntry
-
skipLookup
public boolean skipLookup()
- Specified by:
skipLookupin interfaceCacheEntry- Overrides:
skipLookupin classReadCommittedEntry- Returns:
trueif the value must not be fetch from an external source
-
clone
public RepeatableReadEntry clone()
- Specified by:
clonein interfaceCacheEntry- Specified by:
clonein interfaceMVCCEntry- Overrides:
clonein classReadCommittedEntry
-
setValue
public final Object setValue(Object value)
Description copied from interface:CacheEntrySets the value of the entry, returning the previous value- Specified by:
setValuein interfaceCacheEntry- Specified by:
setValuein interfaceMap.Entry- Overrides:
setValuein classReadCommittedEntry- Parameters:
value- value to set- Returns:
- previous value
-
resetCurrentValue
public void resetCurrentValue()
Description copied from interface:MVCCEntryReset the current value of the entry to the value before the commmand was executed the first time. This is invoked before the command is retried.- Specified by:
resetCurrentValuein interfaceMVCCEntry- Overrides:
resetCurrentValuein classReadCommittedEntry
-
updatePreviousValue
public void updatePreviousValue()
Description copied from interface:MVCCEntryUpdate the previous value of the entry - set it to current value. This is invoked when the command is successfuly finished (there won't be any more retries) or when the value was updated from external source.- Specified by:
updatePreviousValuein interfaceMVCCEntry- Overrides:
updatePreviousValuein classReadCommittedEntry
-
getOldValue
public Object getOldValue()
-
getOldMetadata
public Metadata getOldMetadata()
-
setRead
public void setRead()
Description copied from interface:MVCCEntryMark that this entry was loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check. ReplacesCacheTransaction.addReadKey(Object).
-
isRead
public boolean isRead()
Description copied from interface:MVCCEntryCheck is this entry as loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check. ReplacesCacheTransaction.keyRead(Object).
-
-