|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.context.AbstractContext
org.infinispan.context.TransactionContextImpl
public class TransactionContextImpl
A transaction context specially geared to dealing with MVCC.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.infinispan.context.AbstractContext |
|---|
AbstractContext.ContextFlags |
| Field Summary |
|---|
| Fields inherited from class org.infinispan.context.AbstractContext |
|---|
contextFlags, flags, lookedUpEntries |
| Constructor Summary | |
|---|---|
TransactionContextImpl(Transaction tx)
|
|
| Method Summary | |
|---|---|
void |
addDummyEntryCreatedByCacheLoader(Object key)
Adds a key to the list of uninitialized entry keys created by the cache loader. |
void |
addLocalModification(WriteCommand command)
Adds a modification to the local modification list. |
void |
addModification(WriteCommand command)
Adds a modification to the modification list. |
void |
addRemovedEntry(Object key)
Adds the key that has been removed in the scope of the current transaction. |
boolean |
equals(Object o)
|
List<Object> |
getDummyEntriesCreatedByCacheLoader()
|
GlobalTransaction |
getGobalTransaction()
|
List<WriteCommand> |
getLocalModifications()
Returns all modifications that have been invoked with the LOCAL cache mode option. |
protected int |
getLockSetSize()
|
List<WriteCommand> |
getModifications()
Returns all modifications. |
List<Object> |
getRemovedEntries()
Gets the list of removed keys. |
Transaction |
getTransaction()
Returns a local transaction associated with this context. |
boolean |
hasAnyModifications()
|
int |
hashCode()
|
boolean |
hasLocalModifications()
|
boolean |
hasModifications()
|
boolean |
isForceAsyncReplication()
Gets the value of the forceAsyncReplication flag. |
boolean |
isForceSyncReplication()
Gets the value of the forceSyncReplication flag. |
void |
putLookedUpEntries(Map<Object,CacheEntry> entries)
|
void |
reset()
Cleans up internal state, freeing up references. |
void |
setForceAsyncReplication(boolean forceAsyncReplication)
Sets the value of the forceAsyncReplication flag. |
void |
setForceSyncReplication(boolean forceSyncReplication)
Sets the value of the forceSyncReplication flag. |
void |
setGlobalTransaction(GlobalTransaction gtx)
|
void |
setTransaction(Transaction tx)
Sets the local transaction to be associated with this transaction context. |
String |
toString()
Returns debug information about this transaction. |
| Methods inherited from class org.infinispan.context.AbstractContext |
|---|
clearLookedUpEntries, copyInto, getFlags, getLookedUpEntries, hasFlag, hasLockedKey, isContainsLocks, isContainsModifications, isContextFlagSet, isFlagsUninitialized, lookupEntry, putLookedUpEntry, removeLookedUpEntry, resetFlags, setContainsLocks, setContainsModifications, setContextFlag, setContextFlag, setFlags, setFlags, unsetContextFlag |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.infinispan.context.EntryLookup |
|---|
clearLookedUpEntries, getLookedUpEntries, hasLockedKey, isContainsLocks, isContainsModifications, lookupEntry, putLookedUpEntry, removeLookedUpEntry, setContainsLocks, setContainsModifications |
| Methods inherited from interface org.infinispan.context.FlagContainer |
|---|
getFlags, hasFlag, isFlagsUninitialized, resetFlags, setFlags, setFlags |
| Constructor Detail |
|---|
public TransactionContextImpl(Transaction tx)
throws SystemException,
RollbackException
SystemException
RollbackException| Method Detail |
|---|
protected final int getLockSetSize()
getLockSetSize in class AbstractContextpublic void reset()
TransactionContext
reset in interface TransactionContextreset in class AbstractContextpublic GlobalTransaction getGobalTransaction()
getGobalTransaction in interface TransactionContextpublic void putLookedUpEntries(Map<Object,CacheEntry> entries)
putLookedUpEntries in interface EntryLookupputLookedUpEntries in class AbstractContextpublic void addModification(WriteCommand command)
TransactionContext
addModification in interface TransactionContextcommand - modificationpublic List<WriteCommand> getModifications()
TransactionContext
getModifications in interface TransactionContextpublic void addLocalModification(WriteCommand command)
TransactionContext
addLocalModification in interface TransactionContextcommand - command to add to list. Should not be null.public List<WriteCommand> getLocalModifications()
TransactionContext
getLocalModifications in interface TransactionContextpublic void addRemovedEntry(Object key)
TransactionContext
addRemovedEntry in interface TransactionContextkey - key that has been removed.public List<Object> getRemovedEntries()
TransactionContext
getRemovedEntries in interface TransactionContextpublic void setTransaction(Transaction tx)
TransactionContext
setTransaction in interface TransactionContexttx - JTA transaction to associate with.public void setGlobalTransaction(GlobalTransaction gtx)
setGlobalTransaction in interface TransactionContextpublic Transaction getTransaction()
TransactionContext
getTransaction in interface TransactionContextpublic boolean isForceAsyncReplication()
TransactionContext
isForceAsyncReplication in interface TransactionContextpublic void setForceAsyncReplication(boolean forceAsyncReplication)
TransactionContext
setForceAsyncReplication in interface TransactionContextforceAsyncReplication - value of forceAsyncReplicationpublic boolean isForceSyncReplication()
TransactionContext
isForceSyncReplication in interface TransactionContextpublic void setForceSyncReplication(boolean forceSyncReplication)
TransactionContext
setForceSyncReplication in interface TransactionContextforceSyncReplication - value of forceSyncReplicationpublic String toString()
toString in class Objectpublic void addDummyEntryCreatedByCacheLoader(Object key)
TransactionContext
addDummyEntryCreatedByCacheLoader in interface TransactionContextkey - key to add. Must not be null.public List<Object> getDummyEntriesCreatedByCacheLoader()
getDummyEntriesCreatedByCacheLoader in interface TransactionContextpublic boolean hasModifications()
hasModifications in interface TransactionContextpublic boolean hasLocalModifications()
hasLocalModifications in interface TransactionContextpublic boolean hasAnyModifications()
hasAnyModifications in interface TransactionContextpublic boolean equals(Object o)
equals in class AbstractContextpublic int hashCode()
hashCode in class AbstractContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||