Package com.google.gerrit.server.util
Class ThreadLocalRequestScopePropagator<C>
- java.lang.Object
- 
- com.google.gerrit.server.util.RequestScopePropagator
- 
- com.google.gerrit.server.util.ThreadLocalRequestScopePropagator<C>
 
 
- 
- Type Parameters:
- C- "context" type stored in the- ThreadLocal.
 - Direct Known Subclasses:
- PerThreadRequestScope.Propagator
 
 public abstract class ThreadLocalRequestScopePropagator<C> extends RequestScopePropagator RequestScopePropagatorimplementation for request scopes based on aThreadLocalcontext.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedThreadLocalRequestScopePropagator(com.google.inject.Scope scope, ThreadLocal<C> threadLocal, ThreadLocalRequestContext local)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CcontinuingContext(C ctx)Returns a new context object based on the passed in context that has no request scoped objects initialized.protected <T> Callable<T>wrapImpl(Callable<T> callable)- 
Methods inherited from class com.google.gerrit.server.util.RequestScopePropagatorcleanup, context, wrap, wrap
 
- 
 
- 
- 
- 
Constructor Detail- 
ThreadLocalRequestScopePropagatorprotected ThreadLocalRequestScopePropagator(com.google.inject.Scope scope, ThreadLocal<C> threadLocal, ThreadLocalRequestContext local)
 
- 
 - 
Method Detail- 
wrapImplprotected final <T> Callable<T> wrapImpl(Callable<T> callable) - Specified by:
- wrapImplin class- RequestScopePropagator
- See Also:
- RequestScopePropagator.wrap(Callable)
 
 - 
continuingContextprotected abstract C continuingContext(C ctx) Returns a new context object based on the passed in context that has no request scoped objects initialized.Note that some code paths expect request-scoped objects like CurrentUserto be constructible starting from just the context object returned by this method. For example, in the SSH scope, the context includes theSshSession, which is used bySshCurrentUserProviderto construct a newCurrentUserin the new thread.- Parameters:
- ctx- the context to continue.
- Returns:
- a new context.
 
 
- 
 
-