org.infinispan.context
Class AbstractInvocationContextContainer
java.lang.Object
org.infinispan.context.AbstractInvocationContextContainer
- All Implemented Interfaces:
- InvocationContextContainer
- Direct Known Subclasses:
- NonTransactionalInvocationContextContainer, TransactionalInvocationContextContainer
public abstract class AbstractInvocationContextContainer
- extends Object
- implements InvocationContextContainer
Base class for InvocationContextContainer implementations.
- Since:
- 5.1
- Author:
- Mircea Markus
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ctxHolder
protected final ThreadLocal<InvocationContext> ctxHolder
AbstractInvocationContextContainer
public AbstractInvocationContextContainer()
createRemoteInvocationContextForCommand
public InvocationContext createRemoteInvocationContextForCommand(VisitableCommand cacheCommand,
Address origin)
- Description copied from interface:
InvocationContextContainer
- As
InvocationContextContainer.createRemoteInvocationContext(org.infinispan.remoting.transport.Address)
, but returning the flags to
the context from the Command if any Flag was set.
- Specified by:
createRemoteInvocationContextForCommand
in interface InvocationContextContainer
origin
- the origin of the command, or null if local
getInvocationContext
public InvocationContext getInvocationContext(boolean quiet)
- Description copied from interface:
InvocationContextContainer
- Returns the
InvocationContext
that is currently associated with the calling thread. Important:
implementations of this method are most likely expensive, involving thread locals. It is recommended to cache
the result of this method rather than repeating the call.
- Specified by:
getInvocationContext
in interface InvocationContextContainer
clearThreadLocal
public void clearThreadLocal()
- Description copied from interface:
InvocationContextContainer
- Must be called as each thread exists the interceptor chain.
- Specified by:
clearThreadLocal
in interface InvocationContextContainer
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.