Package com.scurrilous.circe.impl
Interface HashCache
public interface HashCache
Interface implemented by hash function caches.
-
Method Summary
Modifier and TypeMethodDescriptionget(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 parametersrequired- the required hash support flagsloader- 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
-