org.eclipse.viatra.query.runtime.matchers.util

## Class PurgableCache

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.util.PurgableCache

- All Implemented Interfaces:
    ICache

      public class PurgableCache
      extends java.lang.Object
      implements ICache

  Since:
    1.7
  No Reference:
    This class is not intended to be referenced by clients.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PurgableCache()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getValue(java.lang.Object key, java.lang.Class<? extends T> clazz, java.util.function.Supplier<T> valueProvider)` Return a selected value for the key object.
    `void` | `purge()` Removes all values stored in the cache

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PurgableCache

          public PurgableCache()

  - ### Method Detail

    - #### getValue

          public <T> T getValue(java.lang.Object key,
                                java.lang.Class<? extends T> clazz,
                                java.util.function.Supplier<T> valueProvider)

      Description copied from interface: `ICache`
      Return a selected value for the key object. If the value is not available in the cache yet, the given provider is called once
      Specified by:
        `getValue` in interface `ICache`

    - #### purge

          public void purge()

      Removes all values stored in the cache