Class FetchThroughMetadataCache<IdentifierType,MetadataType>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.oidc.metadata.cache.impl.AbstractMetadataCache<IdentifierType,MetadataType>
net.shibboleth.oidc.metadata.cache.impl.FetchThroughMetadataCache<IdentifierType,MetadataType>
- Type Parameters:
IdentifierType- the metadata identifier type.MetadataType- the metadata type.
- All Implemented Interfaces:
MetadataCache<MetadataType>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
@ThreadSafe
public class FetchThroughMetadataCache<IdentifierType,MetadataType>
extends AbstractMetadataCache<IdentifierType,MetadataType>
A
metadata cache implementation that does not support reading and writing to
a backing store. Entries are fetched, validated, and filtered before being returned to the caller.
Each request always requires fetching and processing. This is not,
therefore, a true cache, and is only useful for special cases which just want to exercise the
fetch, validate, filter, cycle.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<CriteriaSet,MetadataType> The function to use to fetch/load metadata entries.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidget(CriteriaSet criteria) Get the list of metadata matching the given identifier.voidsetFetchStrategy(Function<CriteriaSet, MetadataType> strategy) Set the metadata fetching strategy.Methods inherited from class net.shibboleth.oidc.metadata.cache.impl.AbstractMetadataCache
doDestroy, errorHandlingWrapper, freshLoad, getBackingStore, getCriteriaToIdentifierStrategy, getExecutorService, getIdentifierExtractionStrategy, getLogPrefix, getMetadataFilterStrategy, getMetadataValidPredicate, getRefreshDelayFactor, hasExpired, invalidate, invalidateAll, lookupIdentifier, lookupIndexedIdentifier, newFilterContext, setCriteriaToIdentifierStrategy, setIdentifierExtractionStrategy, setMetadataBeforeRemovalHook, setMetadataFilterStrategy, setMetadataValidPredicate, setRefreshDelayFactor, shouldAttemptRefresh, writeToBackingStoreMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
fetchStrategy
The function to use to fetch/load metadata entries.
-
-
Constructor Details
-
FetchThroughMetadataCache
protected FetchThroughMetadataCache()Constructor.
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractMetadataCache<IdentifierType,MetadataType> - Throws:
ComponentInitializationException
-
setFetchStrategy
Set the metadata fetching strategy.- Parameters:
strategy- the strategy used to fetch metadata using a 'read-through' semantic.
-