Package com.google.gerrit.server.git
Class TracingHook
- java.lang.Object
-
- com.google.gerrit.server.git.TracingHook
-
- All Implemented Interfaces:
AutoCloseable,org.eclipse.jgit.transport.ProtocolV2Hook
public class TracingHook extends Object implements org.eclipse.jgit.transport.ProtocolV2Hook, AutoCloseable
Git hook for ls-refs and fetch that enables Gerrit request tracing if the user sets the 'trace' server option.This hook is only invoked if Git protocol v2 is used.
If the 'trace' server option is specified without value, this means without providing a trace ID, a trace ID is generated, but it's not returned to the client. Hence users are advised to always provide a trace ID.
-
-
Constructor Summary
Constructors Constructor Description TracingHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidonFetch(org.eclipse.jgit.transport.FetchV2Request req)voidonLsRefs(org.eclipse.jgit.transport.LsRefsV2Request req)
-
-
-
Method Detail
-
onLsRefs
public void onLsRefs(org.eclipse.jgit.transport.LsRefsV2Request req)
- Specified by:
onLsRefsin interfaceorg.eclipse.jgit.transport.ProtocolV2Hook
-
onFetch
public void onFetch(org.eclipse.jgit.transport.FetchV2Request req)
- Specified by:
onFetchin interfaceorg.eclipse.jgit.transport.ProtocolV2Hook
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-