Package com.scurrilous.circe.impl
Interface HashCache
-
public interface HashCache
Interface implemented by hash function caches.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Hash
get(HashParameters params, java.util.EnumSet<HashSupport> required, java.util.concurrent.Callable<Hash> loader)
Requests a cached hash function with the given parameters and required support flags.
-
-
-
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 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:
java.util.concurrent.ExecutionException
- if the loader throws an exception
-
-