|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TxInvocationContext
Interface defining additional functionality for invocation contexts that propagate within a transaction's scope.
Method Summary | |
---|---|
void |
addAffectedKey(Object key)
|
void |
addAllAffectedKeys(Collection<Object> keys)
Registers a new participant with the transaction. |
Set<Object> |
getAffectedKeys()
Returns the set of keys that are affected by this transaction. |
CacheTransaction |
getCacheTransaction()
|
GlobalTransaction |
getGlobalTransaction()
Returns the id of the transaction associated with the current call. |
List<WriteCommand> |
getModifications()
Returns all the modifications performed in the scope of the current transaction. |
Transaction |
getTransaction()
Returns the tx associated with the current thread. |
boolean |
hasModifications()
Were there any modifications performed within the tx's scope? |
boolean |
isImplicitTransaction()
|
boolean |
isTransactionValid()
|
void |
setImplicitTransaction(boolean implicit)
Marks this transaction as implicit; implicit transactions are started for transactional caches that have the autoCommit enabled. |
Methods inherited from interface org.infinispan.context.InvocationContext |
---|
addLockedKey, clearLockedKeys, clone, getClassLoader, getLockedKeys, getLockOwner, getOrigin, hasLockedKey, isInTxScope, isOriginLocal, isUseFutureReturnType, setClassLoader, setUseFutureReturnType |
Methods inherited from interface org.infinispan.context.EntryLookup |
---|
clearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry |
Methods inherited from interface org.infinispan.context.FlagContainer |
---|
getFlags, hasFlag, reset, setFlags, setFlags |
Method Detail |
---|
boolean hasModifications()
Set<Object> getAffectedKeys()
GlobalTransaction getGlobalTransaction()
List<WriteCommand> getModifications()
Transaction getTransaction()
InvocationContext.isOriginLocal()
, as Transaction
are not propagated from the node where tx was
started.
IllegalStateException
- if the call is performed from a InvocationContext.isOriginLocal()
==false context.void addAllAffectedKeys(Collection<Object> keys)
void addAffectedKey(Object key)
boolean isTransactionValid()
void setImplicitTransaction(boolean implicit)
boolean isImplicitTransaction()
CacheTransaction getCacheTransaction()
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |