Interface HashCache


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

      • get

        Hash get​(HashParameters params,
                 java.util.EnumSet<HashSupport> required,
                 java.util.concurrent.Callable<Hash> loader)
          throws java.util.concurrent.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:
        java.util.concurrent.ExecutionException - if the loader throws an exception