public static class PerThreadRequestScope.Propagator extends ThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
Modifier and Type | Method and 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> java.util.concurrent.Callable<T> |
scope(RequestContext requestContext,
java.util.concurrent.Callable<T> callable) |
wrapImpl
cleanup, context, wrap, wrap
protected com.google.gerrit.server.git.PerThreadRequestScope.Context continuingContext(com.google.gerrit.server.git.PerThreadRequestScope.Context ctx)
ThreadLocalRequestScopePropagator
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 the SshSession
, which is used by SshCurrentUserProvider
to construct a new CurrentUser
in the new thread.
continuingContext
in class ThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
ctx
- the context to continue.public <T> java.util.concurrent.Callable<T> scope(RequestContext requestContext, java.util.concurrent.Callable<T> callable)