Interface LogMinerCache<K,V>
- All Known Implementing Classes:
EhcacheLogMinerCache,InfinispanLogMinerCache,MemoryBasedLogMinerCache
public interface LogMinerCache<K,V>
Interface describing the functionality needed to cache data in during LogMiner processing.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all keys/values from the cache.booleancontainsKey(K key) Returns true if the cache contains the given key.voidConsume a Stream of all the entries in the cache.voidforEach(BiConsumer<K, V> action) Retrieve the value for the given key.booleanisEmpty()Returns true if the cache is empty.default voidA Stream of available keys will be provided to the given Consumer.voidAdd the key and value into the cache.Remove the given key from the cache and return the value that was associated with it.voidremoveIf(Predicate<LogMinerCache.Entry<K, V>> predicate) Remove all keys/values from the cache when thePredicatereturns true;intsize()Returns the size of the cache.<T> TstreamAndReturn(Function<Stream<LogMinerCache.Entry<K, V>>, T> function) Apply the given function to the provided stream and return the result from the function.default voidA Stream of available values will be provided to the given Consumer.
-
Method Details
-
entries
Consume a Stream of all the entries in the cache.- Parameters:
entryStream-
-
keys
A Stream of available keys will be provided to the given Consumer. -
values
A Stream of available values will be provided to the given Consumer. -
clear
void clear()Clear all keys/values from the cache. -
get
Retrieve the value for the given key. -
isEmpty
boolean isEmpty()Returns true if the cache is empty. -
containsKey
Returns true if the cache contains the given key. -
put
Add the key and value into the cache. -
remove
Remove the given key from the cache and return the value that was associated with it. -
size
int size()Returns the size of the cache. -
forEach
-
removeIf
Remove all keys/values from the cache when thePredicatereturns true; -
streamAndReturn
Apply the given function to the provided stream and return the result from the function.
-