Class ThreadContextReference<C>
java.lang.Object
org.wildfly.clustering.context.ThreadContextReference<C>
- Type Parameters:
C- the context type
- All Implemented Interfaces:
Consumer<C>, Function<C,C>, Supplier<C>, UnaryOperator<C>, ContextReference<C>
- Direct Known Subclasses:
ThreadContextClassLoaderReference
Reference that can be associated with an arbitrary thread.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionThreadContextReference(Supplier<Thread> reference, Function<Thread, C> accessor, BiConsumer<Thread, C> applicator) Constructs a context reference for a provided thread. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextReference
apply, provide
-
Constructor Details
-
ThreadContextReference
public ThreadContextReference(Supplier<Thread> reference, Function<Thread, C> accessor, BiConsumer<Thread, C> applicator) Constructs a context reference for a provided thread.- Parameters:
reference- a provider of a threadaccessor- a function used to access the context of a thread.applicator- a consumer used to apply context to a thread.
-
-
Method Details
-
accept
-
get
-