Package com.scurrilous.circe.checksum
Class Crc32cSse42Provider
- java.lang.Object
-
- com.scurrilous.circe.impl.AbstractHashProvider<HashParameters>
-
- com.scurrilous.circe.checksum.Crc32cSse42Provider
-
- All Implemented Interfaces:
HashProvider
public final class Crc32cSse42Provider extends AbstractHashProvider<HashParameters>
-
-
Constructor Summary
Constructors Constructor Description Crc32cSse42Provider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StatelessHash
createCacheable(HashParameters params, java.util.EnumSet<HashSupport> required)
Called byAbstractHashProvider.getCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)
to create new cacheable stateless hash functions.protected Hash
get(HashParameters params, java.util.EnumSet<HashSupport> required)
Requests a hash function using the given parameters and support flags.protected java.util.EnumSet<HashSupport>
querySupportTyped(HashParameters params)
Implemented by subclasses to provide information about the available implementations corresponding to the given hash algorithm parameters.-
Methods inherited from class com.scurrilous.circe.impl.AbstractHashProvider
createStateful, getCacheable, getIncrementalInt, getIncrementalLong, getStatelessInt, getStatelessLong, querySupport
-
-
-
-
Method Detail
-
querySupportTyped
protected java.util.EnumSet<HashSupport> querySupportTyped(HashParameters params)
Description copied from class:AbstractHashProvider
Implemented by subclasses to provide information about the available implementations corresponding to the given hash algorithm parameters. Called byAbstractHashProvider.querySupport(com.scurrilous.circe.HashParameters)
if the hash parameters match the base type supported by this provider.- Specified by:
querySupportTyped
in classAbstractHashProvider<HashParameters>
- Parameters:
params
- the hash algorithm parameters- Returns:
- a set of flags indicating the level of support
-
get
protected Hash get(HashParameters params, java.util.EnumSet<HashSupport> required)
Description copied from class:AbstractHashProvider
Requests a hash function using the given parameters and support flags. This method is only responsible for checking support flags returned byAbstractHashProvider.querySupportTyped(P)
.To support caching of stateless hash functions, call
AbstractHashProvider.getCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)
from this method and implementAbstractHashProvider.createCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)
.- Specified by:
get
in classAbstractHashProvider<HashParameters>
- Parameters:
params
- the hash algorithm parametersrequired
- the required hash support flags- Returns:
- a hash function
-
createCacheable
protected StatelessHash createCacheable(HashParameters params, java.util.EnumSet<HashSupport> required)
Description copied from class:AbstractHashProvider
Called byAbstractHashProvider.getCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)
to create new cacheable stateless hash functions. The default implementation simply throwsUnsupportedOperationException
.- Overrides:
createCacheable
in classAbstractHashProvider<HashParameters>
- Parameters:
params
- the hash algorithm parametersrequired
- the required hash support flags- Returns:
- a stateless hash function
-
-