T
- the type of data being indexedpublic class MetadataIndexManager<T> extends Object
EntityDescriptor
,
based on a set of MetadataIndex
instances currently held.Modifier and Type | Class and Description |
---|---|
static class |
MetadataIndexManager.EntityIDExtractionFunction
Extraction function which returns the entityID of the input
EntityDescriptor . |
static class |
MetadataIndexManager.IdentityExtractionFunction
Extraction function which simply returns the input
EntityDescriptor . |
Modifier and Type | Field and Description |
---|---|
private com.google.common.base.Function<EntityDescriptor,T> |
entityDescriptorFunction
Function to extract the data item to be indexed from an EntityDescriptor.
|
private Map<MetadataIndex,MetadataIndexStore<T>> |
indexes
Storage for secondary indexes.
|
private org.slf4j.Logger |
log
Logger.
|
Constructor and Description |
---|
MetadataIndexManager(Set<MetadataIndex> initIndexes,
com.google.common.base.Function<EntityDescriptor,T> extractionFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Set<MetadataIndex> |
getIndexes()
Get the set of all
MetadataIndex instances currently initialized. |
protected MetadataIndexStore<T> |
getStore(MetadataIndex index)
Get the
MetadataIndexStore for the specified MetadataIndex . |
void |
indexEntityDescriptor(EntityDescriptor descriptor)
Index the specified
EntityDescriptor based on the indexes currently held. |
com.google.common.base.Optional<Set<T>> |
lookupIndexedItems(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
Resolve the set of indexed data items based on the indexes currently held.
|
private org.slf4j.Logger log
private Map<MetadataIndex,MetadataIndexStore<T>> indexes
private com.google.common.base.Function<EntityDescriptor,T> entityDescriptorFunction
public MetadataIndexManager(@Nullable @NonnullElements @Unmodifiable @NotLive Set<MetadataIndex> initIndexes, @Nonnull com.google.common.base.Function<EntityDescriptor,T> extractionFunction)
initIndexes
- indexes for which to initialize storageextractionFunction
- function to extract the indexed data item from an EntityDescriptor@Nonnull @NonnullElements @Unmodifiable @NotLive public Set<MetadataIndex> getIndexes()
MetadataIndex
instances currently initialized.@Nullable protected MetadataIndexStore<T> getStore(@Nonnull MetadataIndex index)
MetadataIndexStore
for the specified MetadataIndex
.index
- the index for which the store is desired@Nonnull @NonnullElements public com.google.common.base.Optional<Set<T>> lookupIndexedItems(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
criteria
- the criteria set to processOptional
instance containing the indexed data items resolved via indexes,
and based on the input criteria set. If the Optional instance indicates 'absent',
there were either no indexes configured, or no criteria were applicable/understood
by any indexes. If 'present' is indicated, then there were applicable/understood criteria,
and the wrapped set contains the indexed data, which may be empty.public void indexEntityDescriptor(@Nonnull EntityDescriptor descriptor)
EntityDescriptor
based on the indexes currently held.descriptor
- the entity descriptor to indexCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.