org.infinispan.context
Class TransactionalInvocationContextContainer
java.lang.Object
org.infinispan.context.AbstractInvocationContextContainer
org.infinispan.context.TransactionalInvocationContextContainer
- All Implemented Interfaces:
- InvocationContextContainer
public class TransactionalInvocationContextContainer
- extends AbstractInvocationContextContainer
Invocation context to be used for transactional caches.
- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionalInvocationContextContainer
public TransactionalInvocationContextContainer()
init
public void init(TransactionManager tm,
TransactionTable transactionTable)
createNonTxInvocationContext
public NonTxInvocationContext createNonTxInvocationContext()
- Description copied from interface:
InvocationContextContainer
- Will create an
NonTxInvocationContext
with the NonTxInvocationContext.isOriginLocal()
returning true.
createSingleKeyNonTxInvocationContext
public InvocationContext createSingleKeyNonTxInvocationContext()
- Description copied from interface:
InvocationContextContainer
- Will create an
NonTxInvocationContext
with the NonTxInvocationContext.isOriginLocal()
returning true.
createInvocationContext
public InvocationContext createInvocationContext(boolean isWrite,
int keyCount)
- Description copied from interface:
InvocationContextContainer
- If we are in a tx scope this will return an
TxInvocationContext
. Otherwise it
will return an NonTxInvocationContext
. Either way, both context will be marked
as local, i.e. InvocationContext.isOriginLocal()
will be true.
createInvocationContext
public InvocationContext createInvocationContext(Transaction tx)
- Description copied from interface:
InvocationContextContainer
- Creates an invocation context
- Returns:
createTxInvocationContext
public LocalTxInvocationContext createTxInvocationContext()
- Description copied from interface:
InvocationContextContainer
- Returns a
LocalTxInvocationContext
.
createRemoteTxInvocationContext
public RemoteTxInvocationContext createRemoteTxInvocationContext(RemoteTransaction tx,
Address origin)
- Description copied from interface:
InvocationContextContainer
- Returns an
RemoteTxInvocationContext
.
- Parameters:
tx
- remote transactionorigin
- the origin of the command, or null if local
createRemoteInvocationContext
public NonTxInvocationContext createRemoteInvocationContext(Address origin)
- Description copied from interface:
InvocationContextContainer
- Returns an
NonTxInvocationContext
whose NonTxInvocationContext.isOriginLocal()
flag will be true.
- Parameters:
origin
- the origin of the command, or null if local
getInvocationContext
public InvocationContext getInvocationContext()
newNonTxInvocationContext
protected final NonTxInvocationContext newNonTxInvocationContext(boolean local)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.