Package org.wildfly.clustering.context
Interface ContextReference<C>
- Type Parameters:
C- the context type
- All Superinterfaces:
Consumer<C>,Function<C,,C> Supplier<C>,UnaryOperator<C>
- All Known Implementing Classes:
ContextReference.SimpleContextReference,ThreadContextClassLoaderReference,ThreadContextReference
Reference to some context.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault Cstatic <C> ContextReference<C> fromThreadLocal(ThreadLocal<C> threadLocal) static <C> ContextReference<C> of(AtomicReference<C> reference) static <C> ContextReference<C> static <C> ContextReference<C> of(Supplier<C> supplier, Consumer<C> consumer, UnaryOperator<C> operator) Returns a context provider for the specified value.
-
Method Details
-
fromThreadLocal
-
of
-
of
static <C> ContextReference<C> of(Supplier<C> supplier, Consumer<C> consumer, UnaryOperator<C> operator) -
of
-
apply
-
provide
Returns a context provider for the specified value.- Parameters:
target- the target context- Returns:
- a context provider
-