|
||||||||||
| 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
|
protected EnumSet<Flag> |
flags
|
protected Set<Object> |
keysAddedInCurrentInvocation
|
| Constructor Summary | |
|---|---|
AbstractInvocationContext()
|
|
| Method Summary | |
|---|---|
AbstractInvocationContext |
clone()
|
Set<Flag> |
getFlags()
|
Set<Object> |
getKeysAddedInCurrentInvocation()
Retrieves a set of keys added to the context within the scope of the current ivocation up to the current point in time. |
boolean |
hasFlag(Flag o)
|
boolean |
hasLockedEntries()
Returns true if the context has any locked entries associated with it. |
boolean |
hasLockedKey(Object key)
Using this method should always ensure locks checked in the appropriate scope. |
protected boolean |
isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
Tests whether a context flag is set. |
boolean |
isFlagsUninitialized()
|
boolean |
isUseFutureReturnType()
|
protected void |
keyAddedInCurrentInvocation(Object key)
Records that a key has been added. |
void |
reset()
|
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 |
setUseFutureReturnType(boolean useFutureReturnType)
|
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 |
|---|
getLockOwner, isInTxScope, isOriginLocal |
| Methods inherited from interface org.infinispan.context.EntryLookup |
|---|
clearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry |
| Field Detail |
|---|
protected volatile EnumSet<Flag> flags
protected Set<Object> keysAddedInCurrentInvocation
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 unset
protected 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 FlagContainerpublic Set<Flag> getFlags()
getFlags in interface FlagContainerpublic void setFlags(Flag... flags)
setFlags in interface FlagContainerpublic void setFlags(Collection<Flag> flags)
setFlags in interface FlagContainerpublic void reset()
reset in interface FlagContainerpublic boolean isFlagsUninitialized()
isFlagsUninitialized in interface FlagContainerpublic boolean hasLockedKey(Object key)
EntryLookup
hasLockedKey in interface EntryLookupkey - lock to test
public boolean hasLockedEntries()
InvocationContext
hasLockedEntries in interface InvocationContextpublic boolean isUseFutureReturnType()
isUseFutureReturnType in interface InvocationContextpublic void setUseFutureReturnType(boolean useFutureReturnType)
setUseFutureReturnType in interface InvocationContextprotected void keyAddedInCurrentInvocation(Object key)
EntryLookup.putLookedUpEntry(Object, org.infinispan.container.entries.CacheEntry)
and EntryLookup.putLookedUpEntries(java.util.Map) for each key added.
key - key to recordpublic Set<Object> getKeysAddedInCurrentInvocation()
InvocationContext
getKeysAddedInCurrentInvocation in interface InvocationContextpublic AbstractInvocationContext clone()
clone in interface InvocationContextclone in class Objectpublic String toString()
toString in class Object
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||