public abstract class AbstractInvocationContext extends Object implements InvocationContext
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractInvocationContext.ContextFlag |
| Modifier and Type | Field and Description |
|---|---|
protected byte |
contextFlags |
| Constructor and Description |
|---|
AbstractInvocationContext() |
| Modifier and Type | Method and Description |
|---|---|
AbstractInvocationContext |
clone()
Clones the invocation context.
|
ClassLoader |
getClassLoader()
Returns the class loader associated with this invocation
|
Address |
getOrigin()
Get the origin of the command, or null if the command originated locally
|
boolean |
hasLockedKey(Object key)
Returns true if the lock being tested is already held in the current scope, false otherwise.
|
protected boolean |
isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
Tests whether a context flag is set.
|
boolean |
isEntryRemovedInContext(Object key) |
boolean |
isUseFutureReturnType()
Indicates whether the call requires a
Future
as return type. |
protected void |
onEntryValueReplaced(Object key,
InternalCacheEntry cacheEntry) |
boolean |
replaceValue(Object key,
InternalCacheEntry cacheEntry)
Tries to replace the value of the wrapped entry associated with the given key in the context, if one exists.
|
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader associated for this invocation
|
protected void |
setContextFlag(AbstractInvocationContext.ContextFlag flag)
Utility method that sets a given context flag.
|
protected void |
setContextFlag(AbstractInvocationContext.ContextFlag flag,
boolean set)
Utility value that sets or un-sets a context flag based on a boolean passed in
|
void |
setOrigin(Address origin) |
void |
setUseFutureReturnType(boolean useFutureReturnType)
Sets whether the call requires a
Future
as return type. |
protected void |
unsetContextFlag(AbstractInvocationContext.ContextFlag flag)
Utility method that un-sets a context flag.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLockedKey, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, isOriginLocalclearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntryprotected final boolean isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
flag - context flag to testprotected final void setContextFlag(AbstractInvocationContext.ContextFlag flag)
flag - context flag to setprotected final void unsetContextFlag(AbstractInvocationContext.ContextFlag flag)
flag - context flag to unsetprotected final void setContextFlag(AbstractInvocationContext.ContextFlag flag, boolean set)
flag - flag to set or unsetset - if true, the context flag is set. If false, the context flag is unset.public Address getOrigin()
InvocationContextgetOrigin in interface InvocationContextpublic void setOrigin(Address origin)
public boolean hasLockedKey(Object key)
InvocationContexthasLockedKey in interface InvocationContextkey - lock to testpublic boolean isUseFutureReturnType()
InvocationContextFuture
as return type.isUseFutureReturnType in interface InvocationContextFuture
as return type, false otherwisepublic void setUseFutureReturnType(boolean useFutureReturnType)
InvocationContextFuture
as return type.setUseFutureReturnType in interface InvocationContextuseFutureReturnType - boolean indicating whether a Future
will be needed.public AbstractInvocationContext clone()
InvocationContextclone in interface InvocationContextclone in class Objectpublic ClassLoader getClassLoader()
InvocationContextgetClassLoader in interface InvocationContextpublic void setClassLoader(ClassLoader classLoader)
InvocationContextsetClassLoader in interface InvocationContextpublic boolean replaceValue(Object key, InternalCacheEntry cacheEntry)
InvocationContextreplaceValue in interface InvocationContextpublic boolean isEntryRemovedInContext(Object key)
isEntryRemovedInContext in interface InvocationContextprotected void onEntryValueReplaced(Object key, InternalCacheEntry cacheEntry)
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.