Skip navigation links
A C D E G H I M N P R S T V W 

A

AbstractThreadLocalContext<T> - Class in nl.talsmasoftware.context.threadlocal
Abstract base class that will maintain a shared, static ThreadLocal instance for each concrete subclass of this type.
AbstractThreadLocalContext(T) - Constructor for class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
Instantiates a new context with the specified value.
awaitTermination(long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 

C

CallMappingExecutorService - Class in nl.talsmasoftware.context.delegation
Abstract base-class that makes it a little easier to schedule tasks (Runnable or Callable objects) using an existing ExecutorService while providing a custom mapping for 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
 
close() - Method in interface nl.talsmasoftware.context.Context
Closes this context and restores any context changes made by this object to the way things were before it got created.
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.
Context<T> - Interface in nl.talsmasoftware.context
A context can be anything that needs to be maintained on the 'current thread' level.
ContextAwareExecutorService - Class in nl.talsmasoftware.context.executors
An instance of an executor service that delegates to another executor service that makes a new context snapshot whenever a task is scheduled (both Callable and Runnable tasks are mapped).
ContextAwareExecutorService(ExecutorService) - Constructor for class nl.talsmasoftware.context.executors.ContextAwareExecutorService
 
ContextManager<T> - Interface in nl.talsmasoftware.context
This interface defines the contract for a ContextManager Service.
ContextManagers - Class in nl.talsmasoftware.context
Utility class to allow concurrent systems to take snapshots of all contexts from known ContextManager implementations.
ContextSnapshot - Interface in nl.talsmasoftware.context
Interface for a 'snapshot' that can capture the (then-) 'active context' from all known registered ContextManager implementations.
Obtain a new snapshot by calling ContextManagers.createContextSnapshot() which will include a snapshot for all supported Context types through their respective managers.
createContextSnapshot() - Static method in class nl.talsmasoftware.context.ContextManagers
This method is able to create a 'snapshot' from the current active context from all known ContextManager implementations.
current(Class<? extends CTX>) - Static method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
 

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 ExecutorService implementations by forwarding all methods to a delegate executor service.
The class also provides overridable wrapper methods 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 Future by forwarding all required methods to a delegate future object.
The class also provides overridable wrapper methods for result and exception outcomes.
DelegatingFuture(Future<V>) - Constructor for class nl.talsmasoftware.context.delegation.DelegatingFuture
 

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
 
execute(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 

G

get() - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
 
get(long, TimeUnit) - Method in class nl.talsmasoftware.context.delegation.DelegatingFuture
 
getActiveContext() - Method in interface nl.talsmasoftware.context.ContextManager
This method returns the current context, or null if no context is currently active.
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 null if it was already closed.

H

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

initializeNewContext(T) - Method in interface nl.talsmasoftware.context.ContextManager
This method initializes 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
 

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.

N

nl.talsmasoftware.context - package nl.talsmasoftware.context
This package contains the core concepts of this context-propagation library.
nl.talsmasoftware.context.delegation - package nl.talsmasoftware.context.delegation
 
nl.talsmasoftware.context.executors - package nl.talsmasoftware.context.executors
 
nl.talsmasoftware.context.threadlocal - package nl.talsmasoftware.context.threadlocal
 
nonNullDelegate() - Method in class nl.talsmasoftware.context.delegation.Wrapper
Acessor to provide a guaranteed non-null delegate instance for use within delegation method implementations.

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 null in case there was no active context when this context was created.

R

reactivate() - Method in interface nl.talsmasoftware.context.ContextSnapshot
This method activates all contained values by the snapshot in their respective Context implementations.

S

shutdown() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
shutdownNow() - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
snapshot - Variable in class nl.talsmasoftware.context.delegation.WrapperWithContext
 
submit(Callable<T>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
submit(Runnable, T) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
submit(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 

T

threadLocalInstanceOf(Class<? extends CTX>) - Static method in class nl.talsmasoftware.context.threadlocal.AbstractThreadLocalContext
Returns the shared, static ThreadLocal instance 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.threadlocal.AbstractThreadLocalContext
Returns the classname of this context followed by "{closed}" if it has been closed already; otherwise the contained value by this context will be added.

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 getValue() implementation will return null in 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

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(Runnable) - Method in class nl.talsmasoftware.context.delegation.CallMappingExecutorService
Default implementation to wrap Runnable objects before scheduling: wrap it into a Callable object and return an unwrapped Runnable implementation that simply runs by calling the mapped Callable object.
wrap(Callable<T>) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
wrap(Runnable) - Method in class nl.talsmasoftware.context.delegation.DelegatingExecutorService
 
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 ExecutionException after 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 Collection of Future objects: Create a new list and add each individually wrapped object into it.
Wrapper<T> - Class in nl.talsmasoftware.context.delegation
Base wrapper class offering a non-null delegate method.
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
 
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 Collection of Callable objects: Create a new collection and add each individually wrapped object into it.
A C D E G H I M N P R S T V W 
Skip navigation links

Copyright © 2016–2017 Talsma ICT. All rights reserved.