Class AbstractConcurrentCustomScope<A extends Annotation>

java.lang.Object
io.micronaut.context.scope.AbstractConcurrentCustomScope<A>
Type Parameters:
A - The annotation type
All Implemented Interfaces:
LifeCycle<AbstractConcurrentCustomScope<A>>, CustomScope<A>, Closeable, AutoCloseable

public abstract class AbstractConcurrentCustomScope<A extends Annotation> extends Object implements CustomScope<A>, LifeCycle<AbstractConcurrentCustomScope<A>>, AutoCloseable
Abstract implementation of the custom scope interface that simplifies defining new scopes using the Map interface.

Note this implementation uses a singleReentrantReadWriteLock to lock the entire scope hence it is designed for scopes that will hold a small amount of beans. For implementations that hold many beans it is recommended to use a lock per BeanIdentifier.

Since:
3.0.0
Author:
graemerocher