Package oracle.jdbc
Interface Tracer
-
public interface Tracer
Implementers of this interface provide a method that can be called by the Oracle Database JDBC drivers to support application and system tracing. If an instance is registered with an OracleConnection, that instance's roundTrip method will be called before and after each round trip to the database executed by that connection. The roundTrip method has limited access to the Connection but can get some information about the round trip and set a trace id.If the driver understands the type of the trace id, the driver will use that trace id in trace records generated by the driver during the round trip. If the driver does not understand the type of the trace id it will use the result of calling toString on the trace id. What trace ids the driver understands may change from release to release.
- Since:
- 22c
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Tracer.Sequence
Indicates if a call toTracer#roundTrip
is before or after the round trip to the database.static interface
Tracer.TraceContext
Information about the round trip.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
roundTrip(Tracer.Sequence seq, Tracer.TraceContext traceContext, java.lang.Object userContext)
Called before and after each round trip on the Connection if observability is enabled.
-
-
-
Method Detail
-
roundTrip
java.lang.Object roundTrip(Tracer.Sequence seq, Tracer.TraceContext traceContext, java.lang.Object userContext)
Called before and after each round trip on the Connection if observability is enabled. The before and after calls are always made in pairs even if observability is enabled/disabled during a round trip.- Parameters:
seq
- BEFORE if before the round trip, AFTER if after the round triptraceContext
- Information about the round trip. Valid only during the calluserContext
- Result of previous call on this Connection or null if no previous call or if observability was disabled since the previous call.- Returns:
- a user context object that is passed to the next call on this Connection.
May be
null
.
-
-