Class CacheServiceImpl.Builder
java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.storage.impl.CacheServiceImpl.Builder
- All Implemented Interfaces:
CacheServiceImpl.IBuildStage,CacheServiceImpl.IUserHandleMappingCacheStage
- Enclosing class:
- CacheServiceImpl
public static final class CacheServiceImpl.Builder
extends Object
implements CacheServiceImpl.IUserHandleMappingCacheStage, CacheServiceImpl.IBuildStage
A builder to safely construct this object.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe cache.private Function<CredentialRecord,String> The key extraction strategy.The lookup key extraction strategy.private Function<CredentialRecord,String> The value extraction strategy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the service.The userHandle to username mapping cache.withKeyExtractionStrategy(Function<CredentialRecord, String> keyExtractionStrategy) The strategy to use to convert aCredentialRecordinto a key suitable for the cache.withLookupKeyExtractionStrategy(Function<com.yubico.webauthn.data.ByteArray, String> lookupKeyExtractionStrategy) The strategy to use to convert a ByteArray into a key suitable for the cache.withValueExtractionStrategy(Function<CredentialRecord, String> valueExtractionStrategy) The strategy to use to convert aCredentialRecordinto a key suitable for the cache.
-
Field Details
-
cacheBuild
The cache. -
keyExtractionStrategyBuild
The key extraction strategy. -
lookupKeyExtractionStrategyBuild
The lookup key extraction strategy. -
valueExtractionStrategyBuild
The value extraction strategy.
-
-
Constructor Details
-
Builder
private Builder()Constructor.
-
-
Method Details
-
withCache
Description copied from interface:CacheServiceImpl.IUserHandleMappingCacheStageThe userHandle to username mapping cache.- Specified by:
withCachein interfaceCacheServiceImpl.IUserHandleMappingCacheStage- Parameters:
cache- the cache implementation- Returns:
- the next stage
-
withKeyExtractionStrategy
public CacheServiceImpl.IBuildStage withKeyExtractionStrategy(Function<CredentialRecord, String> keyExtractionStrategy) Description copied from interface:CacheServiceImpl.IBuildStageThe strategy to use to convert aCredentialRecordinto a key suitable for the cache.- Specified by:
withKeyExtractionStrategyin interfaceCacheServiceImpl.IBuildStage- Parameters:
keyExtractionStrategy- the strategy to use- Returns:
- the next stage
-
withLookupKeyExtractionStrategy
public CacheServiceImpl.IBuildStage withLookupKeyExtractionStrategy(Function<com.yubico.webauthn.data.ByteArray, String> lookupKeyExtractionStrategy) Description copied from interface:CacheServiceImpl.IBuildStageThe strategy to use to convert a ByteArray into a key suitable for the cache.- Specified by:
withLookupKeyExtractionStrategyin interfaceCacheServiceImpl.IBuildStage- Parameters:
lookupKeyExtractionStrategy- the strategy to use- Returns:
- the next stage
-
withValueExtractionStrategy
public CacheServiceImpl.IBuildStage withValueExtractionStrategy(Function<CredentialRecord, String> valueExtractionStrategy) Description copied from interface:CacheServiceImpl.IBuildStageThe strategy to use to convert aCredentialRecordinto a key suitable for the cache.- Specified by:
withValueExtractionStrategyin interfaceCacheServiceImpl.IBuildStage- Parameters:
valueExtractionStrategy- the strategy to use- Returns:
- the next stage
-
build
Description copied from interface:CacheServiceImpl.IBuildStageBuild the service.- Specified by:
buildin interfaceCacheServiceImpl.IBuildStage- Returns:
- the instantiated cache service.
-