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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StatelessHashcreateCacheable(HashParameters params, EnumSet<HashSupport> required) Called byAbstractHashProvider.getCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)to create new cacheable stateless hash functions.protected Hashget(HashParameters params, EnumSet<HashSupport> required) Requests a hash function using the given parameters and support flags.protected 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
-
Constructor Details
-
Crc32cSse42Provider
public Crc32cSse42Provider()
-
-
Method Details
-
querySupportTyped
Description copied from class:AbstractHashProviderImplemented 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:
querySupportTypedin classAbstractHashProvider<HashParameters>- Parameters:
params- the hash algorithm parameters- Returns:
- a set of flags indicating the level of support
-
get
Description copied from class:AbstractHashProviderRequests 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:
getin classAbstractHashProvider<HashParameters>- Parameters:
params- the hash algorithm parametersrequired- the required hash support flags- Returns:
- a hash function
-
createCacheable
Description copied from class:AbstractHashProviderCalled byAbstractHashProvider.getCacheable(P, java.util.EnumSet<com.scurrilous.circe.HashSupport>)to create new cacheable stateless hash functions. The default implementation simply throwsUnsupportedOperationException.- Overrides:
createCacheablein classAbstractHashProvider<HashParameters>- Parameters:
params- the hash algorithm parametersrequired- the required hash support flags- Returns:
- a stateless hash function
-