|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InvocationContextContainer
Manages the association between an InvocationContext
and the
calling thread. Also acts as a factory for creating various types of
InvocationContext
s.
Method Detail |
---|
InvocationContext createInvocationContext()
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 getInvocationContext()
will return same instance.
InvocationContext createInvocationContext(Transaction tx)
tx
-
NonTxInvocationContext createNonTxInvocationContext()
NonTxInvocationContext
with the
NonTxInvocationContext.isOriginLocal()
returning true.
LocalTxInvocationContext createTxInvocationContext()
LocalTxInvocationContext
. The context is also
associated with the current thread, so further calls to getInvocationContext()
will
return same instance.
RemoteTxInvocationContext createRemoteTxInvocationContext(Address origin)
RemoteTxInvocationContext
. The context is also
associated with the current thread, so further calls to getInvocationContext()
will
return same instance.
origin
- the origin of the command, or null if localInvocationContext createRemoteInvocationContext(Address origin)
NonTxInvocationContext
whose
NonTxInvocationContext.isOriginLocal()
flag will be true.
The context is also associated with the current thread, so further calls to
getInvocationContext()
will return same instance.
origin
- the origin of the command, or null if localInvocationContext createRemoteInvocationContextForCommand(VisitableCommand cacheCommand, Address origin)
#createRemoteInvocationContext()
, but returning the flags to the context from
the Command if any Flag was set.
cacheCommand
- origin
- the origin of the command, or null if localInvocationContext getInvocationContext()
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.
IllegalStateException
- if there is no context associated with the current thread.InvocationContext suspend()
void resume(InvocationContext ic)
InvocationContext
with the calling thread.
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |