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
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear all keys/values from the cache.
    boolean
    Returns true if the cache contains the given key.
    void
    Consume a Stream of all the entries in the cache.
    void
    forEach(BiConsumer<K,V> action)
     
    get(K key)
    Retrieve the value for the given key.
    boolean
    Returns true if the cache is empty.
    default void
    keys(Consumer<Stream<K>> keyStreamConsumer)
    A Stream of available keys will be provided to the given Consumer.
    void
    put(K key, V value)
    Add the key and value into the cache.
    remove(K key)
    Remove the given key from the cache and return the value that was associated with it.
    void
    Remove all keys/values from the cache when the Predicate returns true;
    int
    Returns the size of the cache.
    <T> T
    Apply the given function to the provided stream and return the result from the function.
    default void
    values(Consumer<Stream<V>> valueStreamConsumer)
    A Stream of available values will be provided to the given Consumer.
  • Method Details

    • entries

      void entries(Consumer<Stream<LogMinerCache.Entry<K,V>>> entryStream)
      Consume a Stream of all the entries in the cache.
      Parameters:
      entryStream -
    • keys

      default void keys(Consumer<Stream<K>> keyStreamConsumer)
      A Stream of available keys will be provided to the given Consumer.
    • values

      default void values(Consumer<Stream<V>> valueStreamConsumer)
      A Stream of available values will be provided to the given Consumer.
    • clear

      void clear()
      Clear all keys/values from the cache.
    • get

      V get(K key)
      Retrieve the value for the given key.
    • isEmpty

      boolean isEmpty()
      Returns true if the cache is empty.
    • containsKey

      boolean containsKey(K key)
      Returns true if the cache contains the given key.
    • put

      void put(K key, V value)
      Add the key and value into the cache.
    • remove

      V remove(K key)
      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

      void forEach(BiConsumer<K,V> action)
    • removeIf

      void removeIf(Predicate<LogMinerCache.Entry<K,V>> predicate)
      Remove all keys/values from the cache when the Predicate returns true;
    • streamAndReturn

      <T> T streamAndReturn(Function<Stream<LogMinerCache.Entry<K,V>>,T> function)
      Apply the given function to the provided stream and return the result from the function.