Package org.infinispan.context.impl
Class NonTransactionalInvocationContextFactory
java.lang.Object
org.infinispan.context.impl.AbstractInvocationContextFactory
org.infinispan.context.impl.NonTransactionalInvocationContextFactory
- All Implemented Interfaces:
InvocationContextFactory
Invocation Context container to be used for non-transactional caches.
- Author:
- Mircea Markus
-
Field Summary
Fields inherited from class org.infinispan.context.impl.AbstractInvocationContextFactory
config
Fields inherited from interface org.infinispan.context.InvocationContextFactory
UNBOUNDED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateInvocationContext
(boolean isWrite, int keyCount) If we are in a tx scope this will return anTxInvocationContext
.createInvocationContext
(javax.transaction.Transaction tx, boolean implicitTransaction) Creates an invocation contextWill create anNonTxInvocationContext
with theAbstractInvocationContext.isOriginLocal()
returning true.createRemoteInvocationContext
(Address origin) Returns anNonTxInvocationContext
whoseAbstractInvocationContext.isOriginLocal()
flag will be true.createRemoteTxInvocationContext
(RemoteTransaction tx, Address origin) Returns anRemoteTxInvocationContext
.Will create anNonTxInvocationContext
with theAbstractInvocationContext.isOriginLocal()
returning true.createTxInvocationContext
(LocalTransaction localTransaction) Returns aLocalTxInvocationContext
.Methods inherited from class org.infinispan.context.impl.AbstractInvocationContextFactory
createClearNonTxInvocationContext, createRemoteInvocationContextForCommand
-
Constructor Details
-
NonTransactionalInvocationContextFactory
public NonTransactionalInvocationContextFactory()
-
-
Method Details
-
createInvocationContext
Description copied from interface:InvocationContextFactory
If we are in a tx scope this will return anTxInvocationContext
. Otherwise it will return anNonTxInvocationContext
. Either way, both context will be marked as local, i.e.InvocationContext.isOriginLocal()
will be true. -
createInvocationContext
public InvocationContext createInvocationContext(javax.transaction.Transaction tx, boolean implicitTransaction) Description copied from interface:InvocationContextFactory
Creates an invocation context -
createNonTxInvocationContext
Description copied from interface:InvocationContextFactory
Will create anNonTxInvocationContext
with theAbstractInvocationContext.isOriginLocal()
returning true. -
createSingleKeyNonTxInvocationContext
Description copied from interface:InvocationContextFactory
Will create anNonTxInvocationContext
with theAbstractInvocationContext.isOriginLocal()
returning true. -
createRemoteInvocationContext
Description copied from interface:InvocationContextFactory
Returns anNonTxInvocationContext
whoseAbstractInvocationContext.isOriginLocal()
flag will be true.- Parameters:
origin
- the origin of the command, or null if local
-
createTxInvocationContext
Description copied from interface:InvocationContextFactory
Returns aLocalTxInvocationContext
. -
createRemoteTxInvocationContext
public RemoteTxInvocationContext createRemoteTxInvocationContext(RemoteTransaction tx, Address origin) Description copied from interface:InvocationContextFactory
Returns anRemoteTxInvocationContext
.- Parameters:
tx
- remote transactionorigin
- the origin of the command, or null if local
-