Package | Description |
---|---|
org.apache.commons.lang3.concurrent |
Provides support classes for multi-threaded programming.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,ConcurrentException> |
MultiBackgroundInitializer.MultiBackgroundInitializerResults.exceptions
A map with the exceptions.
|
Modifier and Type | Method and Description |
---|---|
static ConcurrentException |
ConcurrentUtils.extractCause(java.util.concurrent.ExecutionException ex)
Inspects the cause of the specified
ExecutionException and
creates a ConcurrentException with the checked cause if
necessary. |
ConcurrentException |
MultiBackgroundInitializer.MultiBackgroundInitializerResults.getException(java.lang.String name)
Returns the
ConcurrentException object that was thrown by the
BackgroundInitializer with the given name. |
Modifier and Type | Method and Description |
---|---|
static <K,V> V |
ConcurrentUtils.createIfAbsent(java.util.concurrent.ConcurrentMap<K,V> map,
K key,
ConcurrentInitializer<V> init)
Checks if a concurrent map contains a key and creates a corresponding
value if not.
|
T |
LazyInitializer.get()
Returns the object wrapped by this instance.
|
T |
ConstantInitializer.get()
Returns the object managed by this initializer.
|
T |
ConcurrentInitializer.get()
Returns the fully initialized object produced by this
ConcurrentInitializer . |
T |
BackgroundInitializer.get()
Returns the result of the background initialization.
|
T |
AtomicSafeInitializer.get()
Get (and initialize, if not initialized yet) the required object
|
T |
AtomicInitializer.get()
Returns the object managed by this initializer.
|
static void |
ConcurrentUtils.handleCause(java.util.concurrent.ExecutionException ex)
Handles the specified
ExecutionException . |
protected abstract T |
LazyInitializer.initialize()
Creates and initializes the object managed by this
LazyInitializer . |
protected abstract T |
AtomicSafeInitializer.initialize()
Creates and initializes the object managed by this
AtomicInitializer . |
protected abstract T |
AtomicInitializer.initialize()
Creates and initializes the object managed by this
AtomicInitializer . |
static <T> T |
ConcurrentUtils.initialize(ConcurrentInitializer<T> initializer)
Invokes the specified
ConcurrentInitializer and returns the
object produced by the initializer. |
Constructor and Description |
---|
MultiBackgroundInitializerResults(java.util.Map<java.lang.String,BackgroundInitializer<?>> inits,
java.util.Map<java.lang.String,java.lang.Object> results,
java.util.Map<java.lang.String,ConcurrentException> excepts)
Creates a new instance of
MultiBackgroundInitializerResults
and initializes it with maps for the BackgroundInitializer
objects, their result objects and the exceptions thrown by them. |