Class SingleKeyNonTxInvocationContext

  • All Implemented Interfaces:
    java.lang.Cloneable, EntryLookup, InvocationContext

    @Deprecated
    public final class SingleKeyNonTxInvocationContext
    extends java.lang.Object
    implements InvocationContext
    Deprecated.
    Since 9.0, this class is going to be moved to an internal package.
    Author:
    Mircea Markus, Sanne Grinovero
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addLockedKey​(java.lang.Object key)
      Deprecated.
      Tracks the given key as locked by this invocation context.
      void clearLockedKeys()
      Deprecated.
       
      InvocationContext clone()
      Deprecated.
      Clones the invocation context.
      void forEachEntry​(java.util.function.BiConsumer<java.lang.Object,​CacheEntry> action)
      Deprecated.
      Execute an action for each entry in the context.
      CacheEntry getCacheEntry()
      Deprecated.
       
      java.lang.ClassLoader getClassLoader()
      Deprecated.
      Returns the class loader associated with this invocation
      java.lang.Object getKey()
      Deprecated.
       
      java.util.Set<java.lang.Object> getLockedKeys()
      Deprecated.
      Returns the set of keys that are locked for writing.
      java.lang.Object getLockOwner()
      Deprecated.
      Returns the in behalf of which locks will be acquired.
      java.util.Map<java.lang.Object,​CacheEntry> getLookedUpEntries()
      Deprecated.
      Retrieves a map of entries looked up within the current scope.
      Address getOrigin()
      Deprecated.
       
      boolean hasLockedKey​(java.lang.Object key)
      Deprecated.
      Returns true if the lock being tested is already held in the current scope, false otherwise.
      boolean isEntryRemovedInContext​(java.lang.Object key)
      Deprecated.
       
      boolean isInTxScope()
      Deprecated.
      Returns true if this call is performed in the context of an transaction, false otherwise.
      boolean isKeyEquals​(java.lang.Object key)
      Deprecated.
       
      boolean isOriginLocal()
      Deprecated.
      Returns true if the call was originated locally, false if it is the result of a remote rpc.
      int lookedUpEntriesCount()
      Deprecated.
       
      CacheEntry lookupEntry​(java.lang.Object key)
      Deprecated.
      Retrieves an entry from the collection of looked up entries in the current scope.
      void putLookedUpEntry​(java.lang.Object key, CacheEntry e)
      Deprecated.
      Puts an entry in the registry of looked up entries in the current scope.
      void removeLookedUpEntry​(java.lang.Object key)
      Deprecated.
       
      void resetState()
      Deprecated.
       
      void setClassLoader​(java.lang.ClassLoader classLoader)
      Deprecated.
      Sets the class loader associated for this invocation
      void setLockOwner​(java.lang.Object lockOwner)
      Deprecated.
      Sets the object to be used by lock owner.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SingleKeyNonTxInvocationContext

        public SingleKeyNonTxInvocationContext​(Address origin)
        Deprecated.
    • Method Detail

      • isOriginLocal

        public boolean isOriginLocal()
        Deprecated.
        Description copied from interface: InvocationContext
        Returns true if the call was originated locally, false if it is the result of a remote rpc.
        Specified by:
        isOriginLocal in interface InvocationContext
      • isInTxScope

        public boolean isInTxScope()
        Deprecated.
        Description copied from interface: InvocationContext
        Returns true if this call is performed in the context of an transaction, false otherwise.
        Specified by:
        isInTxScope in interface InvocationContext
      • getLockOwner

        public java.lang.Object getLockOwner()
        Deprecated.
        Description copied from interface: InvocationContext
        Returns the in behalf of which locks will be acquired.
        Specified by:
        getLockOwner in interface InvocationContext
      • setLockOwner

        public void setLockOwner​(java.lang.Object lockOwner)
        Deprecated.
        Description copied from interface: InvocationContext
        Sets the object to be used by lock owner.
        Specified by:
        setLockOwner in interface InvocationContext
      • clone

        public InvocationContext clone()
        Deprecated.
        Description copied from interface: InvocationContext
        Clones the invocation context.
        Specified by:
        clone in interface InvocationContext
        Overrides:
        clone in class java.lang.Object
        Returns:
        A cloned instance of this invocation context instance
      • getLockedKeys

        public java.util.Set<java.lang.Object> getLockedKeys()
        Deprecated.
        Description copied from interface: InvocationContext
        Returns the set of keys that are locked for writing.
        Specified by:
        getLockedKeys in interface InvocationContext
      • addLockedKey

        public void addLockedKey​(java.lang.Object key)
        Deprecated.
        Description copied from interface: InvocationContext
        Tracks the given key as locked by this invocation context.
        Specified by:
        addLockedKey in interface InvocationContext
      • lookupEntry

        public CacheEntry lookupEntry​(java.lang.Object key)
        Deprecated.
        Description copied from interface: EntryLookup
        Retrieves an entry from the collection of looked up entries in the current scope.

        Specified by:
        lookupEntry in interface EntryLookup
        Parameters:
        key - key to look up
        Returns:
        an entry, or null if it cannot be found.
      • isKeyEquals

        public boolean isKeyEquals​(java.lang.Object key)
        Deprecated.
      • getLookedUpEntries

        public java.util.Map<java.lang.Object,​CacheEntry> getLookedUpEntries()
        Deprecated.
        Description copied from interface: EntryLookup
        Retrieves a map of entries looked up within the current scope.

        Note: The key inside the CacheEntry may be null if the key does not exist in the cache.

        Specified by:
        getLookedUpEntries in interface EntryLookup
        Returns:
        a map of looked up entries.
      • forEachEntry

        public void forEachEntry​(java.util.function.BiConsumer<java.lang.Object,​CacheEntry> action)
        Deprecated.
        Description copied from interface: EntryLookup
        Execute an action for each entry in the context. Includes invalid entries, which have a null value and may also report a null key.
        Specified by:
        forEachEntry in interface EntryLookup
      • lookedUpEntriesCount

        public int lookedUpEntriesCount()
        Deprecated.
        Specified by:
        lookedUpEntriesCount in interface EntryLookup
        Returns:
        The number of entries wrapped in the context, including invalid entries.
      • putLookedUpEntry

        public void putLookedUpEntry​(java.lang.Object key,
                                     CacheEntry e)
        Deprecated.
        Description copied from interface: EntryLookup
        Puts an entry in the registry of looked up entries in the current scope.

        Specified by:
        putLookedUpEntry in interface EntryLookup
        Parameters:
        key - key to store
        e - entry to store
      • removeLookedUpEntry

        public void removeLookedUpEntry​(java.lang.Object key)
        Deprecated.
        Specified by:
        removeLookedUpEntry in interface EntryLookup
      • getKey

        public java.lang.Object getKey()
        Deprecated.
      • getCacheEntry

        public CacheEntry getCacheEntry()
        Deprecated.
      • getOrigin

        public Address getOrigin()
        Deprecated.
        Specified by:
        getOrigin in interface InvocationContext
        Returns:
        the origin of the command, or null if the command originated locally
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Deprecated.
        Description copied from interface: InvocationContext
        Returns the class loader associated with this invocation
        Specified by:
        getClassLoader in interface InvocationContext
        Returns:
        a class loader instance or null if no class loader was specifically associated
      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classLoader)
        Deprecated.
        Description copied from interface: InvocationContext
        Sets the class loader associated for this invocation
        Specified by:
        setClassLoader in interface InvocationContext
      • hasLockedKey

        public boolean hasLockedKey​(java.lang.Object key)
        Deprecated.
        Description copied from interface: InvocationContext
        Returns true if the lock being tested is already held in the current scope, false otherwise.
        Specified by:
        hasLockedKey in interface InvocationContext
        Parameters:
        key - lock to test
      • resetState

        public void resetState()
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object