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.
-
Field Summary
Fields inherited from interface org.eclipse.jgit.transport.ProtocolV2Hook
DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jgit.transport.ProtocolV2Hook
onCapabilities, onObjectInfo
-
Constructor Details
-
TracingHook
public TracingHook()
-
-
Method Details
-
onLsRefs
public void onLsRefs(org.eclipse.jgit.transport.LsRefsV2Request req) - Specified by:
onLsRefs
in interfaceorg.eclipse.jgit.transport.ProtocolV2Hook
-
onFetch
public void onFetch(org.eclipse.jgit.transport.FetchV2Request req) - Specified by:
onFetch
in interfaceorg.eclipse.jgit.transport.ProtocolV2Hook
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-