Class PerThreadRequestScope.Propagator

    • 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 the SshSession, which is used by SshCurrentUserProvider to construct a new CurrentUser in the new thread.

        Specified by:
        continuingContext in class ThreadLocalRequestScopePropagator<com.google.gerrit.server.git.PerThreadRequestScope.Context>
        Parameters:
        ctx - the context to continue.
        Returns:
        a new context.