Package net.shibboleth.oidc.metadata
Interface DynamicBackingStore<I,T>
-
- Type Parameters:
I- the identifier typeT- the type of object stored, referenced by the key.
- All Superinterfaces:
BackingStore<I,T>
public interface DynamicBackingStore<I,T> extends BackingStore<I,T>
A dynamic version of a BackingStore.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetadataManagementData<I>computeManagementDataIfAbsent(I identifier, Function<I,MetadataManagementData<I>> mappingFunction)Get the management data for the specified identifier.MetadataManagementData<I>getManagementData(I identifier)Get the management data for the specified identifier.Set<I>getManagementDataIdentifiers()Get the set of entityIDs which currently have management data.voidremoveManagementData(I identifier)Remove the management data for the specified entityID.-
Methods inherited from interface net.shibboleth.oidc.metadata.BackingStore
getIndexedValues, getOrderedValues
-
-
-
-
Method Detail
-
computeManagementDataIfAbsent
@Nonnull MetadataManagementData<I> computeManagementDataIfAbsent(@Nonnull I identifier, @Nonnull Function<I,MetadataManagementData<I>> mappingFunction)
Get the management data for the specified identifier. If the management data does not exist it should be created using the supplied mapping function.Management data facilitates per-entity metadata locking and cache primitives e.g. next refresh time.
Should do so in a thread-safe way e.g. if two threads enter this method, only one should be allowed to create management data for the same identifier.
- Parameters:
identifier- the identifier of the entity to find management data aboutmappingFunction- the function used to create a newMetadataManagementDatainstance if none exist.- Returns:
- a new or previously cache metadata management data.
-
getManagementData
@Nullable MetadataManagementData<I> getManagementData(@Nonnull I identifier)
Get the management data for the specified identifier. If the management data does not exist, null is returned.- Parameters:
identifier- the identifier of the entity to find management data about- Returns:
- the corresponding management data, or null if not found.
-
removeManagementData
void removeManagementData(@Nonnull I identifier)Remove the management data for the specified entityID.- Parameters:
identifier- the input identifier
-
getManagementDataIdentifiers
@Nonnull @NonnullElements @Unmodifiable @NotLive Set<I> getManagementDataIdentifiers()
Get the set of entityIDs which currently have management data.- Returns:
- set of entityIDs, may be empty
-
-