Class JdbcData
java.lang.Object
io.opentelemetry.instrumentation.jdbc.internal.JdbcData
Holds info associated with JDBC connections and prepared statements.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis class is internal and is hence not for public use. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.opentelemetry.instrumentation.api.util.VirtualField<Connection, DbInfo> static final io.opentelemetry.instrumentation.api.util.VirtualField<PreparedStatement, String> -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddParameter(PreparedStatement statement, String key, String value) static voidaddPreparedStatementBatch(PreparedStatement statement) static voidaddStatementBatch(Statement statement, String sql) static voidclearBatch(Statement statement) static voidclearParameters(PreparedStatement statement) static voidgetParameters(PreparedStatement statement) static LonggetPreparedStatementBatchSize(PreparedStatement statement) static JdbcData.StatementBatchInfogetStatementBatchInfo(Statement statement) static DbInfoReturns canonical representation of db info.
-
Field Details
-
connectionInfo
public static final io.opentelemetry.instrumentation.api.util.VirtualField<Connection,DbInfo> connectionInfo -
preparedStatement
public static final io.opentelemetry.instrumentation.api.util.VirtualField<PreparedStatement,String> preparedStatement
-
-
Method Details
-
intern
Returns canonical representation of db info.- Parameters:
dbInfo- db info to canonicalize- Returns:
- db info with same content as input db info. If two equal inputs are given to this method, both calls will return the same instance. This method may return one instance now and a different instance later if the original interned instance was garbage collected.
-
addStatementBatch
-
addPreparedStatementBatch
-
clearBatch
-
getStatementBatchInfo
-
getPreparedStatementBatchSize
-
close
-
getParameters
-
addParameter
-
clearParameters
-