Interface InvocationContext

  • All Superinterfaces:
    java.lang.Cloneable, EntryLookup

    public interface InvocationContext
    extends EntryLookup, java.lang.Cloneable
    A context that contains information pertaining to a given invocation. These contexts typically have the lifespan of a single invocation.
    Manik Surtani (,
    • Method Detail

      • isOriginLocal

        boolean isOriginLocal()
        Returns true if the call was originated locally, false if it is the result of a remote rpc.
      • getOrigin

        Address getOrigin()
        the origin of the command, or null if the command originated locally
      • isInTxScope

        boolean isInTxScope()
        Returns true if this call is performed in the context of an transaction, false otherwise.
      • getLockOwner

        java.lang.Object getLockOwner()
        Returns the in behalf of which locks will be acquired.
      • setLockOwner

        void setLockOwner​(java.lang.Object lockOwner)
        Sets the object to be used by lock owner.
      • clone

        InvocationContext clone()
        Clones the invocation context.
        A cloned instance of this invocation context instance
      • getLockedKeys

        java.util.Set<java.lang.Object> getLockedKeys()
        Returns the set of keys that are locked for writing.
      • clearLockedKeys

        void clearLockedKeys()
      • getClassLoader

        java.lang.ClassLoader getClassLoader()
        Not in use any more, implementations might return null.
        Returns the class loader associated with this invocation
        a class loader instance or null if no class loader was specifically associated
      • setClassLoader

        void setClassLoader​(java.lang.ClassLoader classLoader)
        Not in use any more.
        Sets the class loader associated for this invocation
      • addLockedKey

        void addLockedKey​(java.lang.Object key)
        Tracks the given key as locked by this invocation context.
      • addLockedKeys

        default void addLockedKeys​(java.util.Collection<?> keys)
      • hasLockedKey

        boolean hasLockedKey​(java.lang.Object key)
        Returns true if the lock being tested is already held in the current scope, false otherwise.
        key - lock to test
      • replaceValue

        default boolean replaceValue​(java.lang.Object key,
                                     InternalCacheEntry cacheEntry)
        Since 8.1, use EntryFactory.wrapExternalEntry(InvocationContext, Object, CacheEntry, boolean, boolean) instead.
      • isEntryRemovedInContext

        boolean isEntryRemovedInContext​(java.lang.Object key)