Interface EntryLookup

    • Method Detail

      • lookupEntry

        CacheEntry lookupEntry​(java.lang.Object key)
        Retrieves an entry from the collection of looked up entries in the current scope.

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

        @Deprecated
        java.util.Map<java.lang.Object,​CacheEntry> getLookedUpEntries()
        Deprecated.
        Since 9.3, please use forEachEntry(BiConsumer) or lookedUpEntriesCount() instead.
        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.
      • forEachValue

        default void forEachValue​(java.util.function.BiConsumer<java.lang.Object,​CacheEntry> action)
        Execute an action for each value in the context. Entries that do not have a value (because the key was removed, or it doesn't exist in the cache).
        Since:
        9.3
      • forEachEntry

        default void forEachEntry​(java.util.function.BiConsumer<java.lang.Object,​CacheEntry> action)
        Execute an action for each entry in the context. Includes invalid entries, which have a null value and may also report a null key.
        Since:
        9.3
      • lookedUpEntriesCount

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

        void putLookedUpEntry​(java.lang.Object key,
                              CacheEntry e)
        Puts an entry in the registry of looked up entries in the current scope.

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

        void removeLookedUpEntry​(java.lang.Object key)
      • removeLookedUpEntries

        default void removeLookedUpEntries​(java.util.Collection<?> keys)