Interface HashCache


public interface HashCache
Interface implemented by hash function caches.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(HashParameters params, EnumSet<HashSupport> required, Callable<Hash> loader)
    Requests a cached hash function with the given parameters and required support flags.
  • Method Details

    • get

      Hash get(HashParameters params, EnumSet<HashSupport> required, Callable<Hash> loader) throws ExecutionException
      Requests a cached hash function with the given parameters and required support flags. If no matching function is cached, the given loader is called to obtain one to cache.
      Parameters:
      params - the hash algorithm parameters
      required - the required hash support flags
      loader - a cache loader that creates the function if not cached
      Returns:
      a hash with the given parameters and support flags
      Throws:
      ExecutionException - if the loader throws an exception