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 DataSource
protected boolean
Returns 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
OpenTelemetryLifecycleListener
to retrieve the configuration and get configuration changes because it's theDatabaseDescriptor
that should have implemented theOpenTelemetryLifecycleListener
interface andDescriptor
instances are not available on Jenkins build agent JVMs, only on the Jenkins controller. -
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Database>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<Database>
-