Package org.jenkinsci.plugins.database
Class Database
- All Implemented Interfaces:
ExtensionPoint,Describable<Database>
- Direct Known Subclasses:
AbstractRemoteDatabase,GenericDatabase,NoDatabase
DataSource configured by the user in Jenkins.
This encapsulates a JDBC driver, connection string, and a credential to connect to it.
It serves as a factory to JDBC Connection.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract DataSourceprotected booleanReturns true if OpenTelemetry JDBC instrumentation is enabled.
-
Constructor Details
-
Database
public Database()
-
-
Method Details
-
getDataSource
- Throws:
SQLException
-
isOTelJdbcInstrumentationEnabled
protected boolean isOTelJdbcInstrumentationEnabled()Returns true if OpenTelemetry JDBC instrumentation is enabled.
Implementations couldn't use
OpenTelemetryLifecycleListenerto retrieve the configuration and get configuration changes because it's theDatabaseDescriptorthat should have implemented theOpenTelemetryLifecycleListenerinterface andDescriptorinstances are not available on Jenkins build agent JVMs, only on the Jenkins controller. -
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Database>- Overrides:
getDescriptorin classAbstractDescribableImpl<Database>
-