Package org.opensaml.saml.metadata.resolver.index.impl

# Class LockableMetadataIndexManager<T>

java.lang.Object
org.opensaml.saml.metadata.resolver.index.impl.MetadataIndexManager<T>
org.opensaml.saml.metadata.resolver.index.impl.LockableMetadataIndexManager<T>

Type Parameters:
  `T` - the type of data being indexed

public class LockableMetadataIndexManager<T> extends MetadataIndexManager<T>
A specialization of `MetadataIndexManager` capable of read/write locking.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.opensaml.saml.metadata.resolver.index.impl.MetadataIndexManager

`MetadataIndexManager.EntityIDExtractionFunction, MetadataIndexManager.IdentityExtractionFunction`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final ReadWriteLock`
`readWriteLock`
The manager's read write lock.

## Constructor Summary

Constructors
Constructor
Description
`LockableMetadataIndexManager(Set<MetadataIndex> initIndexes, Function<EntityDescriptor,T> extractionFunction)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`ReadWriteLock`
`getReadWriteLock()`
Get the manager's instance of the `ReadWriteLock`.

### Methods inherited from class org.opensaml.saml.metadata.resolver.index.impl.MetadataIndexManager

`deindexEntityDescriptor, getIndexes, getStore, indexEntityDescriptor, lookupIndexedItems`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### readWriteLock

@Nonnull private final ReadWriteLock readWriteLock
The manager's read write lock.

## Constructor Details

### LockableMetadataIndexManager

public LockableMetadataIndexManager(@Nullable Set<MetadataIndex> initIndexes, @Nonnull Function<EntityDescriptor,T> extractionFunction)
Constructor.

Parameters:
  `initIndexes` - indexes for which to initialize storage
  `extractionFunction` - function to extract the indexed data item from an EntityDescriptor

## Method Details

### getReadWriteLock

@Nonnull public ReadWriteLock getReadWriteLock()
Get the manager's instance of the `ReadWriteLock`.

Callers of the manager are responsible for explicitly locking (and unlocking) for reading and/or writing, based on application use cases.

Returns:
  Returns the rwlock.