|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.context.impl.AbstractInvocationContext
public abstract class AbstractInvocationContext
Common features of transaction and invocation contexts
Nested Class Summary | |
---|---|
protected static class |
AbstractInvocationContext.ContextFlag
|
Field Summary | |
---|---|
protected byte |
contextFlags
|
Constructor Summary | |
---|---|
AbstractInvocationContext()
|
Method Summary | |
---|---|
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 |
isUseFutureReturnType()
Indicates whether the call requires a Future
as return type. |
boolean |
replaceValue(Object key,
Object value)
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. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.infinispan.context.InvocationContext |
---|
addLockedKey, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, isOriginLocal |
Methods inherited from interface org.infinispan.context.EntryLookup |
---|
clearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry |
Field Detail |
---|
protected byte contextFlags
Constructor Detail |
---|
public AbstractInvocationContext()
Method Detail |
---|
protected final boolean isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
flag
- context flag to test
protected 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()
InvocationContext
getOrigin
in interface InvocationContext
public void setOrigin(Address origin)
public boolean hasLockedKey(Object key)
InvocationContext
hasLockedKey
in interface InvocationContext
key
- lock to testpublic boolean isUseFutureReturnType()
InvocationContext
Future
as return type.
isUseFutureReturnType
in interface InvocationContext
Future
as return type, false otherwisepublic void setUseFutureReturnType(boolean useFutureReturnType)
InvocationContext
Future
as return type.
setUseFutureReturnType
in interface InvocationContext
useFutureReturnType
- boolean indicating whether a Future
will be needed.public AbstractInvocationContext clone()
InvocationContext
clone
in interface InvocationContext
clone
in class Object
public ClassLoader getClassLoader()
InvocationContext
getClassLoader
in interface InvocationContext
public void setClassLoader(ClassLoader classLoader)
InvocationContext
setClassLoader
in interface InvocationContext
public boolean replaceValue(Object key, Object value)
InvocationContext
replaceValue
in interface InvocationContext
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |