Class NonTxInvocationContext

    • Constructor Detail

      • NonTxInvocationContext

        public NonTxInvocationContext​(int numEntries,
                                      Address origin)
      • NonTxInvocationContext

        public NonTxInvocationContext​(Address origin)
    • Method Detail

      • lookupEntry

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

        Parameters:
        k - key to look up
        Returns:
        an entry, or null if it cannot be found.
      • removeLookedUpEntry

        public void removeLookedUpEntry​(Object key)
      • putLookedUpEntry

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

        Parameters:
        key - key to store
        e - entry to store
      • getLookedUpEntries

        public Map<Object,​CacheEntry> getLookedUpEntries()
        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.

        Returns:
        a map of looked up entries.
      • forEachEntry

        public void forEachEntry​(BiConsumer<Object,​CacheEntry> action)
        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.
      • lookedUpEntriesCount

        public int lookedUpEntriesCount()
        Returns:
        The number of entries wrapped in the context, including invalid entries.
      • isInTxScope

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

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

        public void setLockOwner​(Object lockOwner)
        Description copied from interface: InvocationContext
        Sets the object to be used by lock owner.
      • addLockedKey

        public void addLockedKey​(Object key)
        Description copied from interface: InvocationContext
        Tracks the given key as locked by this invocation context.
      • getLockedKeys

        public Set<Object> getLockedKeys()
        Description copied from interface: InvocationContext
        Returns the set of keys that are locked for writing.
      • clearLockedKeys

        public void clearLockedKeys()