All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.camunda.bpm.extension.keycloak.cache.QueryCache Maven / Gradle / Ivy

There is a newer version: 2.2.3
Show newest version
package org.camunda.bpm.extension.keycloak.cache;

import java.util.function.Function;

/**
 * The interface for query cache implementations.
 *
 * @param  The type of key used to lookup the cache
 * @param  The cached or computed value corresponding to the provided key
 */
public interface QueryCache {

  /**
   * Gets the cached value if present or computes, stores and returns the computed value.
   *
   * @param key         The key to lookup the cache with
   * @param computation the computation to perform if no entries are present for requested key
   * @return the value corresponding to the provided key
   */
  V getOrCompute(K key, Function computation);

  /**
   * Clear/invalidate all entries in cache.
   */
  void clear();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy