|
||||||||||
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. |
void |
addTransactionParticipants(Collection<Address> addresses)
Adds a transaction participant. |
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. |
Set<Address> |
getTransactionParticipants()
Retrieves a set of Addresses of caches participating in a given transaction for a specific cache. |
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 AbstractContext
public void reset()
TransactionContext
reset
in interface TransactionContext
reset
in class AbstractContext
public GlobalTransaction getGobalTransaction()
getGobalTransaction
in interface TransactionContext
public Set<Address> getTransactionParticipants()
TransactionContext
getTransactionParticipants
in interface TransactionContext
public void addTransactionParticipants(Collection<Address> addresses)
TransactionContext
addTransactionParticipants
in interface TransactionContext
addresses
- address to addpublic void putLookedUpEntries(Map<Object,CacheEntry> entries)
putLookedUpEntries
in interface EntryLookup
putLookedUpEntries
in class AbstractContext
public void addModification(WriteCommand command)
TransactionContext
addModification
in interface TransactionContext
command
- modificationpublic List<WriteCommand> getModifications()
TransactionContext
getModifications
in interface TransactionContext
public void addLocalModification(WriteCommand command)
TransactionContext
addLocalModification
in interface TransactionContext
command
- command to add to list. Should not be null.public List<WriteCommand> getLocalModifications()
TransactionContext
getLocalModifications
in interface TransactionContext
public void addRemovedEntry(Object key)
TransactionContext
addRemovedEntry
in interface TransactionContext
key
- key that has been removed.public List<Object> getRemovedEntries()
TransactionContext
getRemovedEntries
in interface TransactionContext
public void setTransaction(Transaction tx)
TransactionContext
setTransaction
in interface TransactionContext
tx
- JTA transaction to associate with.public void setGlobalTransaction(GlobalTransaction gtx)
setGlobalTransaction
in interface TransactionContext
public Transaction getTransaction()
TransactionContext
getTransaction
in interface TransactionContext
public boolean isForceAsyncReplication()
TransactionContext
isForceAsyncReplication
in interface TransactionContext
public void setForceAsyncReplication(boolean forceAsyncReplication)
TransactionContext
setForceAsyncReplication
in interface TransactionContext
forceAsyncReplication
- value of forceAsyncReplicationpublic boolean isForceSyncReplication()
TransactionContext
isForceSyncReplication
in interface TransactionContext
public void setForceSyncReplication(boolean forceSyncReplication)
TransactionContext
setForceSyncReplication
in interface TransactionContext
forceSyncReplication
- value of forceSyncReplicationpublic String toString()
toString
in class Object
public void addDummyEntryCreatedByCacheLoader(Object key)
TransactionContext
addDummyEntryCreatedByCacheLoader
in interface TransactionContext
key
- key to add. Must not be null.public List<Object> getDummyEntriesCreatedByCacheLoader()
getDummyEntriesCreatedByCacheLoader
in interface TransactionContext
public boolean hasModifications()
hasModifications
in interface TransactionContext
public boolean hasLocalModifications()
hasLocalModifications
in interface TransactionContext
public boolean hasAnyModifications()
hasAnyModifications
in interface TransactionContext
public boolean equals(Object o)
equals
in class AbstractContext
public int hashCode()
hashCode
in class AbstractContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |