Package com.google.gerrit.server.git
Class PerThreadRequestScope.Propagator
- java.lang.Object
-
- com.google.gerrit.server.util.RequestScopePropagator
-
- com.google.gerrit.server.util.ThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
-
- com.google.gerrit.server.git.PerThreadRequestScope.Propagator
-
- Enclosing class:
- PerThreadRequestScope
public static class PerThreadRequestScope.Propagator extends ThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.gerrit.server.git.PerThreadRequestScope.Context
continuingContext(com.google.gerrit.server.git.PerThreadRequestScope.Context ctx)
Returns a new context object based on the passed in context that has no request scoped objects initialized.<T> Callable<T>
scope(RequestContext requestContext, Callable<T> callable)
-
Methods inherited from class com.google.gerrit.server.util.ThreadLocalRequestScopePropagator
wrapImpl
-
Methods inherited from class com.google.gerrit.server.util.RequestScopePropagator
cleanup, context, wrap, wrap
-
-
-
-
Method Detail
-
continuingContext
protected com.google.gerrit.server.git.PerThreadRequestScope.Context continuingContext(com.google.gerrit.server.git.PerThreadRequestScope.Context ctx)
Description copied from class:ThreadLocalRequestScopePropagator
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
CurrentUser
to 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 bySshCurrentUserProvider
to construct a newCurrentUser
in the new thread.- Specified by:
continuingContext
in classThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
- Parameters:
ctx
- the context to continue.- Returns:
- a new context.
-
scope
public <T> Callable<T> scope(RequestContext requestContext, Callable<T> callable)
-
-