Package org.infinispan.context
Interface EntryLookup
- All Known Subinterfaces:
InvocationContext,TxInvocationContext<T>
- All Known Implementing Classes:
AbstractInvocationContext,AbstractTxInvocationContext,ClearInvocationContext,ImmutableContext,LocalTxInvocationContext,NonTxInvocationContext,RemoteTxInvocationContext,SingleKeyNonTxInvocationContext
public interface EntryLookup
Interface that can look up MVCC wrapped entries.
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidforEachEntry(BiConsumer<Object, CacheEntry> action) Execute an action for each entry in the context.default voidforEachValue(BiConsumer<Object, CacheEntry> action) Execute an action for each value in the context.Retrieves a map of entries looked up within the current scope.default intlookupEntry(Object key) Retrieves an entry from the collection of looked up entries in the current scope.<K,V> org.reactivestreams.Publisher<CacheEntry<K, V>> Returns a Publisher that when subscribed to provide all values that have a value in the given context.voidputLookedUpEntry(Object key, CacheEntry e) Puts an entry in the registry of looked up entries in the current scope.default voidremoveLookedUpEntries(Collection<?> keys) void
-
Method Details
-
lookupEntry
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
Map<Object,CacheEntry> getLookedUpEntries()Retrieves a map of entries looked up within the current scope. Note: The key inside the CacheEntry may benullif the key does not exist in the cache.- Returns:
- a map of looked up entries.
-
publisher
Returns a Publisher that when subscribed to provide all values that have a value in the given context.- Type Parameters:
K- key type provided from userV- value type provided from user- Returns:
-
forEachValue
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
Execute an action for each entry in the context. Includes invalid entries, which have anullvalue and may also report anullkey.- Since:
- 9.3
-
lookedUpEntriesCount
default int lookedUpEntriesCount()- Returns:
- The number of entries wrapped in the context, including invalid entries.
-
putLookedUpEntry
Puts an entry in the registry of looked up entries in the current scope.- Parameters:
key- key to storee- entry to store
-
removeLookedUpEntry
-
removeLookedUpEntries
-