Class MetadataIndexStore<T>
- java.lang.Object
-
- org.opensaml.saml.metadata.resolver.index.impl.MetadataIndexStore<T>
-
- Type Parameters:
T- the type of data being indexed
public class MetadataIndexStore<T> extends Object
Component which stores indexed instances of a particular type of data, for exampleEntityDescriptor, under one or more instances ofMetadataIndexKey.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<MetadataIndexKey,Set<T>>indexThe indexed storage of data.
-
Constructor Summary
Constructors Constructor Description MetadataIndexStore()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(MetadataIndexKey key, T item)Add the supplied data item to the index under the suppliedMetadataIndexKey.voidclear()Clear all indexed data items from the store.voidclear(MetadataIndexKey key)Clear all data items indexed under the suppliedMetadataIndexKey.Set<MetadataIndexKey>getKeys()Get the set of allMetadataIndexKeyinstances currently indexed.Set<T>lookup(MetadataIndexKey key)Lookup the instances of data indexed under the suppliedMetadataIndexKey.voidremove(MetadataIndexKey key, T item)Remove the supplied data item from the index under the suppliedMetadataIndexKey.
-
-
-
Field Detail
-
index
@Nonnull private Map<MetadataIndexKey,Set<T>> index
The indexed storage of data.
-
-
Method Detail
-
getKeys
@Nonnull @NonnullElements @Unmodifiable @NotLive public Set<MetadataIndexKey> getKeys()
Get the set of allMetadataIndexKeyinstances currently indexed.- Returns:
- the set of all currently indexed keys
-
lookup
@Nonnull @NonnullElements @Unmodifiable @NotLive public Set<T> lookup(@Nonnull MetadataIndexKey key)
Lookup the instances of data indexed under the suppliedMetadataIndexKey.- Parameters:
key- the index key to lookup- Returns:
- the set of data items indexed under that key
-
add
public void add(MetadataIndexKey key, T item)
Add the supplied data item to the index under the suppliedMetadataIndexKey.- Parameters:
key- the index keyitem- the data item to index
-
remove
public void remove(MetadataIndexKey key, T item)
Remove the supplied data item from the index under the suppliedMetadataIndexKey.- Parameters:
key- the index keyitem- the data item to index
-
clear
public void clear(MetadataIndexKey key)
Clear all data items indexed under the suppliedMetadataIndexKey.- Parameters:
key- the index key
-
clear
public void clear()
Clear all indexed data items from the store.
-
-