|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.context.InvocationContextContainerImpl
public class InvocationContextContainerImpl
Default implementation for InvocationContextContainer
.
Constructor Summary | |
---|---|
InvocationContextContainerImpl()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvocationContextContainerImpl()
Method Detail |
---|
public void init(TransactionManager tm, TransactionTable transactionTable)
public InvocationContext createInvocationContext()
InvocationContextContainer
TxInvocationContext
. Otherwise it will return an
NonTxInvocationContext
. Either way, both context will be
marked as local, i.e. InvocationContext.isOriginLocal()
will be true. The context is
also associated with the current thread, so further calls to InvocationContextContainer.getInvocationContext()
will return same instance.
createInvocationContext
in interface InvocationContextContainer
public InvocationContext createInvocationContext(Transaction tx)
InvocationContextContainer
createInvocationContext
in interface InvocationContextContainer
public LocalTxInvocationContext createTxInvocationContext()
InvocationContextContainer
LocalTxInvocationContext
. The context is also
associated with the current thread, so further calls to InvocationContextContainer.getInvocationContext()
will
return same instance.
createTxInvocationContext
in interface InvocationContextContainer
public RemoteTxInvocationContext createRemoteTxInvocationContext(Address origin)
InvocationContextContainer
RemoteTxInvocationContext
. The context is also
associated with the current thread, so further calls to InvocationContextContainer.getInvocationContext()
will
return same instance.
createRemoteTxInvocationContext
in interface InvocationContextContainer
origin
- the origin of the command, or null if localpublic NonTxInvocationContext createNonTxInvocationContext()
InvocationContextContainer
NonTxInvocationContext
with the
NonTxInvocationContext.isOriginLocal()
returning true.
createNonTxInvocationContext
in interface InvocationContextContainer
public InvocationContext createRemoteInvocationContextForCommand(VisitableCommand cacheCommand, Address origin)
InvocationContextContainer
#createRemoteInvocationContext()
, but returning the flags to the context from
the Command if any Flag was set.
createRemoteInvocationContextForCommand
in interface InvocationContextContainer
origin
- the origin of the command, or null if localpublic NonTxInvocationContext createRemoteInvocationContext(Address origin)
InvocationContextContainer
NonTxInvocationContext
whose
NonTxInvocationContext.isOriginLocal()
flag will be true.
The context is also associated with the current thread, so further calls to
InvocationContextContainer.getInvocationContext()
will return same instance.
createRemoteInvocationContext
in interface InvocationContextContainer
origin
- the origin of the command, or null if localpublic InvocationContext getInvocationContext()
InvocationContextContainer
InvocationContext
that is currently associated with the calling thread.
Important: implementations of this method is most likely expensive (ThreadLocal.get), it is
recommended to cache the result of this method rather than repeating the call.
getInvocationContext
in interface InvocationContextContainer
public InvocationContext suspend()
InvocationContextContainer
suspend
in interface InvocationContextContainer
public void resume(InvocationContext ctxt)
InvocationContextContainer
InvocationContext
with the calling thread.
resume
in interface InvocationContextContainer
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |