|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
|
protected EnumSet<Flag> |
flags
|
Constructor Summary | |
---|---|
AbstractInvocationContext()
|
Method Summary | |
---|---|
AbstractInvocationContext |
clone()
Clones the invocation context. |
ClassLoader |
getClassLoader()
Returns the class loader associated with this invocation |
Set<Flag> |
getFlags()
|
Address |
getOrigin()
Get the origin of the command, or null if the command originated locally |
boolean |
hasFlag(Flag o)
|
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 |
isFlagsUninitialized()
|
boolean |
isUseFutureReturnType()
Indicates whether the call requires a Future
as return type. |
void |
reset()
|
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 |
setFlags(Collection<Flag> flags)
|
void |
setFlags(Flag... flags)
|
void |
setOrigin(Address origin)
|
void |
setUseFutureReturnType(boolean useFutureReturnType)
Sets whether the call requires a Future
as return type. |
String |
toString()
|
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, 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 EnumSet<Flag> flags
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 boolean hasFlag(Flag o)
hasFlag
in interface FlagContainer
public Set<Flag> getFlags()
getFlags
in interface FlagContainer
public void setFlags(Flag... flags)
setFlags
in interface FlagContainer
public void setFlags(Collection<Flag> flags)
setFlags
in interface FlagContainer
public Address getOrigin()
InvocationContext
getOrigin
in interface InvocationContext
public void setOrigin(Address origin)
public void reset()
reset
in interface FlagContainer
public boolean isFlagsUninitialized()
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 String toString()
toString
in class Object
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |