A B C D E F G H I L M N O P R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- AbstractThreadLocalContext<T> - Class in nl.talsmasoftware.context.threadlocal
-
Abstract base class maintaining a shared, static
ThreadLocalinstance for each concrete subclass. - AbstractThreadLocalContext(Class<? extends ContextManager<? super T>>, T) - Constructor for class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Instantiates a new context with the specified value.
- AbstractThreadLocalContext(T) - Constructor for class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Deprecated.Using this constructor makes it impossible to register a
ContextObserver! - accept(T) - Method in class nl.talsmasoftware.context.functions.ConsumerWithContext
- accept(T, U) - Method in class nl.talsmasoftware.context.functions.BiConsumerWithContext
- acceptEither(CompletionStage<? extends T>, Consumer<? super T>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- acceptEitherAsync(CompletionStage<? extends T>, Consumer<? super T>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- acceptEitherAsync(CompletionStage<? extends T>, Consumer<? super T>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- activate(Span) - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
- activate(Span, boolean) - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
-
Deprecated.This is no longer part of the OpenTracing API as of
0.33.0 - active() - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
-
Deprecated.This is no longer part of the OpenTracing API as of
0.33.0 - activeSpan() - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
- allOf(CompletableFuture<?>...) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a new CompletableFuture that is completed when all of the given CompletableFutures complete.
- allOf(ContextSnapshot, CompletableFuture<?>...) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a new CompletableFuture that is completed when all of the given CompletableFutures complete.
- and(BiPredicate<? super IN1, ? super IN2>) - Method in class nl.talsmasoftware.context.functions.BiPredicateWithContext
- and(Predicate<? super T>) - Method in class nl.talsmasoftware.context.functions.PredicateWithContext
- andThen(BiConsumer<? super T, ? super U>) - Method in class nl.talsmasoftware.context.functions.BiConsumerWithContext
- andThen(Consumer<? super T>) - Method in class nl.talsmasoftware.context.functions.ConsumerWithContext
- andThen(Function<? super OUT, ? extends V>) - Method in class nl.talsmasoftware.context.functions.BiFunctionWithContext
- andThen(Function<? super OUT, ? extends V>) - Method in class nl.talsmasoftware.context.functions.FunctionWithContext
- anyOf(CompletableFuture<?>...) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a new CompletableFuture that is completed when any of the given CompletableFutures complete, with the same result.
- anyOf(ContextSnapshot, CompletableFuture<?>...) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a new CompletableFuture that is completed when any of the given CompletableFutures complete, with the same result.
- apply(IN) - Method in class nl.talsmasoftware.context.functions.FunctionWithContext
- apply(IN1, IN2) - Method in class nl.talsmasoftware.context.functions.BiFunctionWithContext
- applyToEither(CompletionStage<? extends T>, Function<? super T, U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- applyToEitherAsync(CompletionStage<? extends T>, Function<? super T, U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- applyToEitherAsync(CompletionStage<? extends T>, Function<? super T, U>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- awaitTermination(long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
B
- BiConsumerWithContext<T,U> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
BiConsumerthatreactivates a context snapshotbefore calling a delegate. - BiConsumerWithContext(Supplier<ContextSnapshot>, BiConsumer<T, U>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiConsumerWithContext
- BiConsumerWithContext(ContextSnapshot, BiConsumer<T, U>) - Constructor for class nl.talsmasoftware.context.functions.BiConsumerWithContext
- BiConsumerWithContext(ContextSnapshot, BiConsumer<T, U>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiConsumerWithContext
- BiFunctionWithContext<IN1,IN2,OUT> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
BiFunctionthatreactivates a context snapshotbefore calling a delegate. - BiFunctionWithContext(Supplier<ContextSnapshot>, BiFunction<IN1, IN2, OUT>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiFunctionWithContext
- BiFunctionWithContext(ContextSnapshot, BiFunction<IN1, IN2, OUT>) - Constructor for class nl.talsmasoftware.context.functions.BiFunctionWithContext
- BiFunctionWithContext(ContextSnapshot, BiFunction<IN1, IN2, OUT>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiFunctionWithContext
- BinaryOperatorWithContext<T> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
BinaryOperatorthatreactivates a context snapshotbefore calling a delegate. - BinaryOperatorWithContext(Supplier<ContextSnapshot>, BinaryOperator<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BinaryOperatorWithContext
- BinaryOperatorWithContext(ContextSnapshot, BinaryOperator<T>) - Constructor for class nl.talsmasoftware.context.functions.BinaryOperatorWithContext
- BinaryOperatorWithContext(ContextSnapshot, BinaryOperator<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BinaryOperatorWithContext
- BiPredicateWithContext<IN1,IN2> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
BiPredicatethatreactivates a context snapshotbefore calling a delegate. - BiPredicateWithContext(Supplier<ContextSnapshot>, BiPredicate<IN1, IN2>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiPredicateWithContext
- BiPredicateWithContext(ContextSnapshot, BiPredicate<IN1, IN2>) - Constructor for class nl.talsmasoftware.context.functions.BiPredicateWithContext
- BiPredicateWithContext(ContextSnapshot, BiPredicate<IN1, IN2>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BiPredicateWithContext
- BooleanSupplierWithContext - Class in nl.talsmasoftware.context.functions
-
A wrapper for
BooleanSupplierthatreactivates a context snapshotbefore calling a delegate. - BooleanSupplierWithContext(Supplier<ContextSnapshot>, BooleanSupplier, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BooleanSupplierWithContext
- BooleanSupplierWithContext(ContextSnapshot, BooleanSupplier) - Constructor for class nl.talsmasoftware.context.functions.BooleanSupplierWithContext
- BooleanSupplierWithContext(ContextSnapshot, BooleanSupplier, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.BooleanSupplierWithContext
C
- CallMappingExecutorService - Class in nl.talsmasoftware.context.delegation
-
Abstract base-class that makes it a little easier to schedule tasks (
RunnableorCallableobjects) using an existingExecutorServicewhile providing a custommappingfor all tasks before they get scheduled. - CallMappingExecutorService(ExecutorService) - Constructor for class nl.talsmasoftware.context.delegation.CallMappingExecutorService
-
Constructor to create a new wrapper around the specified
service delegate. - cancel(boolean) - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
- clear() - Method in interface nl.talsmasoftware.context.clearable.Clearable
-
Clears the current context and any potential parent contexts that may be stacked.
- clear() - Static method in class nl.talsmasoftware.context.locale.LocaleContextManager
-
Unconditionally removes the active context (and any parents).
- clear() - Static method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
-
Unconditionally removes the active context (and any parents).
- clear() - Method in class nl.talsmasoftware.context.springsecurity.SpringSecurityContextManager
-
Clears the Spring SecurityContext by calling SecurityContextHolder.clearContext().
- Clearable - Interface in nl.talsmasoftware.context.clearable
-
Interface that marks an to be 'clearable'.
- ClearableContextManager<T> - Interface in nl.talsmasoftware.context.clearable
-
Convenience interface to mark a Clearable
ContextManager. - clearActiveContexts() - Static method in class nl.talsmasoftware.context.ContextManagers
-
Clears all active contexts from the current thread.
- close() - Method in interface nl.talsmasoftware.context.Context
-
Closes this context.
- close() - Method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Closes this context and in case this context is the active context, restores the active context to the (unclosed) parent context.
If no unclosed parent context exists, the 'active context' is cleared. - completedFuture(U) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
ContextAwareCompletableFuturefrom the already-completed value. - completedFuture(U, ContextSnapshot) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
ContextAwareCompletableFuturefrom the already-completed value. - completedStage(U) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
CompletionStagefrom the already-completed value. - compose(Function<? super V, ? extends IN>) - Method in class nl.talsmasoftware.context.functions.FunctionWithContext
- ConsumerWithContext<T> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
Consumerthatreactivates a context snapshotbefore calling a delegate. - ConsumerWithContext(Supplier<ContextSnapshot>, Consumer<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.ConsumerWithContext
- ConsumerWithContext(ContextSnapshot, Consumer<T>) - Constructor for class nl.talsmasoftware.context.functions.ConsumerWithContext
- ConsumerWithContext(ContextSnapshot, Consumer<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.ConsumerWithContext
- Context<T> - Interface in nl.talsmasoftware.context
-
A context can be anything that needs to be maintained on the 'current thread' level.
- ContextAwareCompletableFuture<T> - Class in nl.talsmasoftware.context.futures
-
This class extends the standard
CompletableFuturethat was introduced in java version 8. - ContextAwareCompletableFuture() - Constructor for class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
ContextSnapshotand remembers that in this completable future, running all completion methods within this snapshot. - ContextAwareCompletableFuture(ContextSnapshot) - Constructor for class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
CompletableFuturewhere all completion methods are run within the specified snapshot context. - ContextAwareExecutorService - Class in nl.talsmasoftware.context.executors
-
Executor service that wraps another executor service, making sure background tasks operates 'within' a context snapshot taken from the submitting thread.
- ContextAwareExecutorService(ExecutorService) - Constructor for class nl.talsmasoftware.context.executors.ContextAwareExecutorService
- ContextManager<T> - Interface in nl.talsmasoftware.context
-
The contract for a ContextManager Service.
- ContextManagers - Class in nl.talsmasoftware.context
-
Utility class to allow concurrent systems to
take snapshots of all contextsfrom knownContextManagerimplementations. - ContextObserver<T> - Interface in nl.talsmasoftware.context.observer
-
Observe context updates for a particular class of ContextManager.
- ContextObservers - Class in nl.talsmasoftware.context.observer
-
Deprecated.The (static) utility methods from this class were moved to the
ContextManagersclass. - ContextScopeManager - Class in nl.talsmasoftware.context.opentracing
-
Our own implementation of the opentracing ScopeManager.
- ContextScopeManager() - Constructor for class nl.talsmasoftware.context.opentracing.ContextScopeManager
- ContextSnapshot - Interface in nl.talsmasoftware.context
-
Interface for a 'snapshot' that can capture the (then-) 'active context' from all known registered
ContextManagerimplementations.
Obtain a new snapshot by callingContextManagers.createContextSnapshot()which will include a snapshot for all supportedContexttypes through their respectivemanagers. - ContextSnapshotSupplier - Interface in nl.talsmasoftware.context.delegation
-
Interface for a
SupplierofContextSnapshot. - ContextTimer - Interface in nl.talsmasoftware.context.timing
-
Minimal Service Provider Interface for services that wish to get informed of context switching metrics.
- createContextSnapshot() - Static method in class nl.talsmasoftware.context.ContextManagers
-
This method is able to create a 'snapshot' from the current
active contextfrom all knownContextManagerimplementations. - current(Class<? extends CTX>) - Static method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
- currentServletRequest() - Static method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
-
Static utility method to obtain the current
ServletRequest(if available).
D
- delegate() - Method in class nl.talsmasoftware.context.delegation.Wrapper
-
Delegate method that can be overridden in case the delegate is not yet available at construction time or when there some strategy applicable that determines the delegate at runtime.
- DelegatingExecutorService - Class in nl.talsmasoftware.context.delegation
-
Abstract baseclass that makes it a little easier to wrap existing
ExecutorServiceimplementations by forwarding all methods to adelegateexecutor service.
The class also provides overridablewrappermethods for all complex input (e.g. - DelegatingExecutorService(ExecutorService) - Constructor for class nl.talsmasoftware.context.delegation.DelegatingExecutorService
-
Creates a new executor service that delegates all methods to the specified
delegate. - DelegatingFuture<V> - Class in nl.talsmasoftware.context.delegation
-
Abstract baseclass that simplifies wrapping an existing
Futureby forwarding all required methods to adelegate futureobject.
The class also provides overridable wrapper methods forresultandexceptionoutcomes. - DelegatingFuture(Future<V>) - Constructor for class nl.talsmasoftware.context.delegation.DelegatingFuture
- destroy() - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextFilter
- doFilter(ServletRequest, ServletResponse, FilterChain) - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextFilter
E
- equals(Object) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- equals(Object) - Method in class nl.talsmasoftware.context.delegation.Wrapper
- equals(Object) - Method in class nl.talsmasoftware.context.delegation.WrapperWithContext
- exceptionally(Function<Throwable, ? extends T>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- execute(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
F
- failedFuture(Throwable) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
ContextAwareCompletableFuturethat is already completed exceptionally with the given exception. - failedFuture(Throwable, ContextSnapshot) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
ContextAwareCompletableFuturethat is already completed exceptionally with the given exception. - failedStage(Throwable) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Creates a new
CompletionStagethat is already completed exceptionally with the given exception. - FunctionWithContext<IN,OUT> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
Functionthatreactivates a context snapshotbefore calling a delegate. - FunctionWithContext(Supplier<ContextSnapshot>, Function<IN, OUT>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.FunctionWithContext
- FunctionWithContext(ContextSnapshot, Function<IN, OUT>) - Constructor for class nl.talsmasoftware.context.functions.FunctionWithContext
- FunctionWithContext(ContextSnapshot, Function<IN, OUT>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.FunctionWithContext
G
- get() - Method in interface nl.talsmasoftware.context.delegation.ContextSnapshotSupplier
-
Supply a snapshot.
- get() - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
- get() - Method in class nl.talsmasoftware.context.functions.SupplierWithContext
- get(long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
- getActiveContext() - Method in interface nl.talsmasoftware.context.ContextManager
-
The currently active context, or
nullif no context is active. - getActiveContext() - Method in class nl.talsmasoftware.context.locale.LocaleContextManager
- getActiveContext() - Method in class nl.talsmasoftware.context.mdc.MdcManager
-
Returns the active MDC values from the current thread.
- getActiveContext() - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
- getActiveContext() - Method in class nl.talsmasoftware.context.opentracing.SpanManager
-
Return the
active spanas aContext. - getActiveContext() - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
- getActiveContext() - Method in class nl.talsmasoftware.context.springsecurity.SpringSecurityContextManager
- getAsBoolean() - Method in class nl.talsmasoftware.context.functions.BooleanSupplierWithContext
- getCurrentLocale() - Static method in class nl.talsmasoftware.context.locale.LocaleContextManager
- getCurrentLocaleOrDefault() - Static method in class nl.talsmasoftware.context.locale.LocaleContextManager
- getObservedContextManager() - Method in interface nl.talsmasoftware.context.observer.ContextObserver
-
The observed context manager(s).
- getValue() - Method in interface nl.talsmasoftware.context.Context
-
Returns the value associated with this context.
- getValue() - Method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Returns the value of this context instance, or
nullif it was already closed.
H
- handle(BiFunction<? super T, Throwable, ? extends U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- handleAsync(BiFunction<? super T, Throwable, ? extends U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- handleAsync(BiFunction<? super T, Throwable, ? extends U>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- hashCode() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- hashCode() - Method in class nl.talsmasoftware.context.delegation.Wrapper
- hashCode() - Method in class nl.talsmasoftware.context.delegation.WrapperWithContext
I
- init(FilterConfig) - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextFilter
- initializeNewContext(Span) - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
-
Initializes a new context for the given Span.
- initializeNewContext(Span) - Method in class nl.talsmasoftware.context.opentracing.SpanManager
- initializeNewContext(Locale) - Method in class nl.talsmasoftware.context.locale.LocaleContextManager
- initializeNewContext(Map<String, String>) - Method in class nl.talsmasoftware.context.mdc.MdcManager
-
Initializes a new MDC context populated by the specified values.
- initializeNewContext(ServletRequest) - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
- initializeNewContext(Authentication) - Method in class nl.talsmasoftware.context.springsecurity.SpringSecurityContextManager
-
Creates a new Spring SecurityContext and sets the value in it.
- initializeNewContext(T) - Method in interface nl.talsmasoftware.context.ContextManager
-
Initialize a new context containing the specified
value. - invokeAll(Collection<? extends Callable<T>>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- invokeAny(Collection<? extends Callable<T>>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- invokeAny(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- isCancelled() - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
- isClosed() - Method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Returns whether this context is closed or not.
- isDone() - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
- isShutdown() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- isTerminated() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
L
- LocaleContextManager - Class in nl.talsmasoftware.context.locale
-
Manager for a
Localebound to the current thread. - LocaleContextManager() - Constructor for class nl.talsmasoftware.context.locale.LocaleContextManager
M
- map(Callable<V>) - Method in class nl.talsmasoftware.context.delegation.CallMappingExecutorService
-
The call mapping that needs to be implemented: map the given callable object into a desired variant before scheduling.
- map(Callable<V>) - Method in class nl.talsmasoftware.context.executors.ContextAwareExecutorService
-
This method maps any callable (before scheduling it) by taking a snapshot of the context in the scheduling thread and propagating this context into the executed callable by snapshot reactivation.
- MdcManager - Class in nl.talsmasoftware.context.mdc
-
Manager to propagate the
MDCcontent from one thread to another. - MdcManager() - Constructor for class nl.talsmasoftware.context.mdc.MdcManager
- MetricsContextTimer - Class in nl.talsmasoftware.context.metrics
-
A
ContextTimerimplementation that locates an appropriateshared metric registry. - MetricsContextTimer() - Constructor for class nl.talsmasoftware.context.metrics.MetricsContextTimer
- MicrometerContextTimer - Class in nl.talsmasoftware.context.micrometer
- MicrometerContextTimer() - Constructor for class nl.talsmasoftware.context.micrometer.MicrometerContextTimer
N
- nl.talsmasoftware.context - package nl.talsmasoftware.context
-
Main package defining the core
context-propagationconcepts in this library - nl.talsmasoftware.context.clearable - package nl.talsmasoftware.context.clearable
-
The
Clearableinterface and aClearableContextManagerin particular. - nl.talsmasoftware.context.delegation - package nl.talsmasoftware.context.delegation
-
Layered code for delegation such as
CallMappingExecutorService. - nl.talsmasoftware.context.executors - package nl.talsmasoftware.context.executors
-
Package for context aware executors.
- nl.talsmasoftware.context.functions - package nl.talsmasoftware.context.functions
-
Java 8 functional interface wrappers that apply context snapshots to the mapped functions.
- nl.talsmasoftware.context.futures - package nl.talsmasoftware.context.futures
-
Package for context-aware java
Futurecode. - nl.talsmasoftware.context.locale - package nl.talsmasoftware.context.locale
-
Maintain a current Locale context.
- nl.talsmasoftware.context.mdc - package nl.talsmasoftware.context.mdc
-
Propagate the
Slf4J MDCcontent from one thread to another. - nl.talsmasoftware.context.metrics - package nl.talsmasoftware.context.metrics
- nl.talsmasoftware.context.micrometer - package nl.talsmasoftware.context.micrometer
- nl.talsmasoftware.context.observer - package nl.talsmasoftware.context.observer
-
Observe context changes
- nl.talsmasoftware.context.opentracing - package nl.talsmasoftware.context.opentracing
- nl.talsmasoftware.context.servletrequest - package nl.talsmasoftware.context.servletrequest
- nl.talsmasoftware.context.springsecurity - package nl.talsmasoftware.context.springsecurity
- nl.talsmasoftware.context.threadlocal - package nl.talsmasoftware.context.threadlocal
-
Package for
ThreadLocalspecific classes. - nl.talsmasoftware.context.timing - package nl.talsmasoftware.context.timing
-
Package containing an api for obtaining timing information about propagated contexts.
- nonNullDelegate() - Method in class nl.talsmasoftware.context.delegation.Wrapper
-
Acessor to provide a guaranteed non-
nulldelegate instance for use within delegation method implementations.
O
- onActivate(Class<? extends ContextManager<? super T>>, T, T) - Static method in class nl.talsmasoftware.context.ContextManagers
-
Notifies all context observers for the specified
contextManagerabout the activated context value. - onActivate(Class<? extends ContextManager<? super T>>, T, T) - Static method in class nl.talsmasoftware.context.observer.ContextObservers
-
Deprecated.This method was moved to the
ContextManagersutility class. - onActivate(T, T) - Method in interface nl.talsmasoftware.context.observer.ContextObserver
-
Indicates that a context was just activated.
- onDeactivate(Class<? extends ContextManager<? super T>>, T, T) - Static method in class nl.talsmasoftware.context.ContextManagers
-
Notifies all context observers for the specified
contextManagerabout the deactivated context value. - onDeactivate(Class<? extends ContextManager<? super T>>, T, T) - Static method in class nl.talsmasoftware.context.observer.ContextObservers
-
Deprecated.This method was moved to the
ContextManagersutility class. - onDeactivate(T, T) - Method in interface nl.talsmasoftware.context.observer.ContextObserver
-
Indicates that a context was just deactivated.
- OpentracingContextTimer - Class in nl.talsmasoftware.context.opentracing
-
This
ContextTimeruses theOpentracing APIto report the timing statistics of the context switches that occurred. - OpentracingContextTimer() - Constructor for class nl.talsmasoftware.context.opentracing.OpentracingContextTimer
- OpentracingSpanManager - Class in nl.talsmasoftware.context.opentracing
-
Deprecated.Renamed to
SpanManager - OpentracingSpanManager() - Constructor for class nl.talsmasoftware.context.opentracing.OpentracingSpanManager
-
Deprecated.
- or(BiPredicate<? super IN1, ? super IN2>) - Method in class nl.talsmasoftware.context.functions.BiPredicateWithContext
- or(Predicate<? super T>) - Method in class nl.talsmasoftware.context.functions.PredicateWithContext
P
- parentContext - Variable in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
The parent context that was active at the time this context was created (if any) or
nullin case there was no active context when this context was created. - PredicateWithContext<T> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
Predicatethatreactivates a context snapshotbefore calling a delegate. - PredicateWithContext(Supplier<ContextSnapshot>, Predicate<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.PredicateWithContext
- PredicateWithContext(ContextSnapshot, Predicate<T>) - Constructor for class nl.talsmasoftware.context.functions.PredicateWithContext
- PredicateWithContext(ContextSnapshot, Predicate<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.PredicateWithContext
R
- reactivate() - Method in interface nl.talsmasoftware.context.ContextSnapshot
-
This method activates all contained values by the snapshot in their respective
Contextimplementations. - run() - Method in class nl.talsmasoftware.context.functions.RunnableWithContext
- runAfterBoth(CompletionStage<?>, Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAfterBothAsync(CompletionStage<?>, Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAfterBothAsync(CompletionStage<?>, Runnable, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAfterEither(CompletionStage<?>, Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAfterEitherAsync(CompletionStage<?>, Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAfterEitherAsync(CompletionStage<?>, Runnable, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- runAsync(Runnable) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
runnabletask in the commonForkJoinPoolwithin the current context and also applies that context to all successive calls to theCompletableFuture. - runAsync(Runnable, Executor) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
runnabletask in the specifiedexecutorwithin the current context and also applies that context to all successive calls to theCompletableFuture. - runAsync(Runnable, Executor, ContextSnapshot) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
runnabletask in the specifiedexecutorwithin the specifiedcontext snapshotand also applies that context to all successive calls to theCompletableFuture. - runAsync(Runnable, Executor, ContextSnapshot, boolean) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
runnabletask in the specifiedexecutorwithin the specifiedcontext snapshotand also applies that context to all successive calls to theCompletableFuture. - RunnableWithContext - Class in nl.talsmasoftware.context.functions
-
A wrapper for
Runnablethatreactivates a context snapshotbefore calling a delegate. - RunnableWithContext(Supplier<ContextSnapshot>, Runnable, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.RunnableWithContext
- RunnableWithContext(ContextSnapshot, Runnable) - Constructor for class nl.talsmasoftware.context.functions.RunnableWithContext
-
Creates a new runnable that performs the following steps, in-order: first reactivate the given snapshot then run the delegate
- RunnableWithContext(ContextSnapshot, Runnable, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.RunnableWithContext
-
Creates a new runnable that performs the following steps, in-order: first reactivate the given snapshot then run the delegate finally, if a consumer was provided capture a new ContextSnapshot
S
- ServletRequestContextFilter - Class in nl.talsmasoftware.context.servletrequest
-
Servlet
Filterthat registers the currentServletRequestwith theServletRequestContextManagerto become theactive contextwhile the filter is active. - ServletRequestContextFilter() - Constructor for class nl.talsmasoftware.context.servletrequest.ServletRequestContextFilter
- ServletRequestContextManager - Class in nl.talsmasoftware.context.servletrequest
-
Manager to propagate a current
ServletRequestwith. - ServletRequestContextManager() - Constructor for class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
- shutdown() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- shutdownNow() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- snapshot() - Method in class nl.talsmasoftware.context.delegation.WrapperWithContext
-
Calls the supplier for the context snapshot, making sure it is called only once for this wrapper instance.
- SpanManager - Class in nl.talsmasoftware.context.opentracing
-
Manager for OpenTracing Span.
- SpanManager() - Constructor for class nl.talsmasoftware.context.opentracing.SpanManager
- SpringSecurityContextManager - Class in nl.talsmasoftware.context.springsecurity
-
A context manager that propagates spring-security
Authenticationobjects into background threads using theContextAwareExecutorService. - SpringSecurityContextManager() - Constructor for class nl.talsmasoftware.context.springsecurity.SpringSecurityContextManager
- submit(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- submit(Runnable, T) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- submit(Callable<T>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- SupplierWithContext<T> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
Supplierthatreactivates a context snapshotbefore calling a delegate. - SupplierWithContext(Supplier<ContextSnapshot>, Supplier<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.SupplierWithContext
- SupplierWithContext(ContextSnapshot, Supplier<T>) - Constructor for class nl.talsmasoftware.context.functions.SupplierWithContext
- SupplierWithContext(ContextSnapshot, Supplier<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.SupplierWithContext
- supplyAsync(Supplier<U>) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
suppliertask in the commonForkJoinPoolwithin the current context and also applies that context to all successive calls to theCompletableFuture. - supplyAsync(Supplier<U>, Executor) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
suppliertask in the specifiedexecutorwithin the current context and also applies that context to all successive calls to theCompletableFuture. - supplyAsync(Supplier<U>, Executor, ContextSnapshot) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
suppliertask in the specifiedexecutorwithin the specifiedcontext snapshotand also applies that context to all successive calls to theCompletableFuture. - supplyAsync(Supplier<U>, Executor, ContextSnapshot, boolean) - Static method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Runs the
suppliertask in the specifiedexecutorwithin the specifiedcontext snapshotand also applies that context to all successive calls to theCompletableFuture.
T
- takeNewSnapshot() - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a context-aware CompletableFuture that takes a new snapshot after each completion stage.
- takeNewSnapshot(boolean) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
-
Returns a context-aware CompletableFuture that may take a new snapshot after each completion stage.
- test(IN1, IN2) - Method in class nl.talsmasoftware.context.functions.BiPredicateWithContext
- test(T) - Method in class nl.talsmasoftware.context.functions.PredicateWithContext
- thenAccept(Consumer<? super T>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenAcceptAsync(Consumer<? super T>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenAcceptAsync(Consumer<? super T>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenAcceptBoth(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenAcceptBothAsync(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenAcceptBothAsync(CompletionStage<? extends U>, BiConsumer<? super T, ? super U>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenApply(Function<? super T, ? extends U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenApplyAsync(Function<? super T, ? extends U>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenApplyAsync(Function<? super T, ? extends U>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenCombine(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenCombineAsync(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenCombineAsync(CompletionStage<? extends U>, BiFunction<? super T, ? super U, ? extends V>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenCompose(Function<? super T, ? extends CompletionStage<U>>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenComposeAsync(Function<? super T, ? extends CompletionStage<U>>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenComposeAsync(Function<? super T, ? extends CompletionStage<U>>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenRun(Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenRunAsync(Runnable) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- thenRunAsync(Runnable, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- threadLocalInstanceOf(Class<? extends CTX>) - Static method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Returns the shared, static
ThreadLocalinstance for the specified context type. - toString() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- toString() - Method in class nl.talsmasoftware.context.delegation.Wrapper
- toString() - Method in class nl.talsmasoftware.context.delegation.WrapperWithContext
- toString() - Method in class nl.talsmasoftware.context.locale.LocaleContextManager
- toString() - Method in class nl.talsmasoftware.context.mdc.MdcManager
- toString() - Method in class nl.talsmasoftware.context.metrics.MetricsContextTimer
- toString() - Method in class nl.talsmasoftware.context.opentracing.ContextScopeManager
- toString() - Method in class nl.talsmasoftware.context.opentracing.SpanManager
- toString() - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextFilter
- toString() - Method in class nl.talsmasoftware.context.servletrequest.ServletRequestContextManager
- toString() - Method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
Returns the classname of this context followed by
"{closed}"if it has been closed already; otherwise the containedvalueby this context will be added.
U
- UnaryOperatorWithContext<T> - Class in nl.talsmasoftware.context.functions
-
A wrapper for
UnaryOperatorthatreactivates a context snapshotbefore calling a delegate. - UnaryOperatorWithContext(Supplier<ContextSnapshot>, UnaryOperator<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.UnaryOperatorWithContext
- UnaryOperatorWithContext(ContextSnapshot, UnaryOperator<T>) - Constructor for class nl.talsmasoftware.context.functions.UnaryOperatorWithContext
- UnaryOperatorWithContext(ContextSnapshot, UnaryOperator<T>, Consumer<ContextSnapshot>) - Constructor for class nl.talsmasoftware.context.functions.UnaryOperatorWithContext
- update(Class<?>, String, long, TimeUnit) - Method in class nl.talsmasoftware.context.metrics.MetricsContextTimer
- update(Class<?>, String, long, TimeUnit) - Method in class nl.talsmasoftware.context.micrometer.MicrometerContextTimer
- update(Class<?>, String, long, TimeUnit) - Method in class nl.talsmasoftware.context.opentracing.OpentracingContextTimer
- update(Class<?>, String, long, TimeUnit) - Method in interface nl.talsmasoftware.context.timing.ContextTimer
-
Provides a new update for the context timer.
- useClassLoader(ClassLoader) - Static method in class nl.talsmasoftware.context.ContextManagers
-
Override the ClassLoader used to lookup contextmanagers.
V
- value - Variable in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
-
The actual value, so subclasses can still access it after the context has been closed, because the default
AbstractThreadLocalContext.getValue()implementation will returnnullin that case.
Please be careful accessing the value after the context was closed: There is no pre-defined meaningful way to handle this situation, as this depends heavily on the desired features of the particular implementation.
W
- whenComplete(BiConsumer<? super T, ? super Throwable>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- whenCompleteAsync(BiConsumer<? super T, ? super Throwable>) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- whenCompleteAsync(BiConsumer<? super T, ? super Throwable>, Executor) - Method in class nl.talsmasoftware.context.futures.ContextAwareCompletableFuture
- wrap(Runnable) - Method in class nl.talsmasoftware.context.delegation.CallMappingExecutorService
- wrap(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- wrap(Callable<T>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- wrap(Callable<V>) - Method in class nl.talsmasoftware.context.delegation.CallMappingExecutorService
-
Wrapping a callable object is delegated to the abstract
CallMappingExecutorService.map(Callable)method. - wrap(Future<T>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
- wrapException(ExecutionException) - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
-
Overridable method to wrap the
ExecutionExceptionafter it has been thrown from the delegate future. - wrapFutures(Collection<? extends Future<T>>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
-
Default way of mapping a
CollectionofFutureobjects: Create a new list and add eachindividually wrappedobject into it. - Wrapper<T> - Class in nl.talsmasoftware.context.delegation
-
Base wrapper class offering a
non-null delegatemethod. - Wrapper(T) - Constructor for class nl.talsmasoftware.context.delegation.Wrapper
-
Constructor providing a delegate wrapped object.
- WrapperWithContext<T> - Class in nl.talsmasoftware.context.delegation
-
Wrapper that also contains a fixed context snapshot.
- WrapperWithContext(ContextSnapshot, T) - Constructor for class nl.talsmasoftware.context.delegation.WrapperWithContext
-
Creates a new Wrapper with the specified context snapshot.
- WrapperWithContext(ContextSnapshotSupplier, T) - Constructor for class nl.talsmasoftware.context.delegation.WrapperWithContext
-
Wraps the delegate and provides a context snapshot.
- wrapResult(V) - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
-
Overridable method to wrap the result after it has been obtained from the delegate future.
- wrapTasks(Collection<? extends Callable<T>>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
-
Default way of mapping a
CollectionofCallableobjects: Create a new collection and add eachindividually wrappedobject into it.
All Classes All Packages