- java.lang.Object
-
- com.github.marschall.jfr.jdbc.JfrDriver
-
- All Implemented Interfaces:
Driver
public final class JfrDriver extends Object implements Driver
A driver that wraps a different driver and generates JFR events.Usage
To use the driver simply prepend "jfr:" to the JDBC connection URL for which you want to generate JFR events. For example if you use "jdbc:jfr:h2:mem:" you will get a connection for "jdbc:h2:mem:"
-
-
Constructor Summary
Constructors Constructor Description JfrDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsURL(String url)
Connection
connect(String url, Properties info)
int
getMajorVersion()
int
getMinorVersion()
Logger
getParentLogger()
DriverPropertyInfo[]
getPropertyInfo(String url, Properties info)
boolean
jdbcCompliant()
-
-
-
Method Detail
-
connect
public Connection connect(String url, Properties info) throws SQLException
- Specified by:
connect
in interfaceDriver
- Throws:
SQLException
-
acceptsURL
public boolean acceptsURL(String url) throws SQLException
- Specified by:
acceptsURL
in interfaceDriver
- Throws:
SQLException
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
- Specified by:
getPropertyInfo
in interfaceDriver
- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfaceDriver
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant
in interfaceDriver
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfaceDriver
- Throws:
SQLFeatureNotSupportedException
-
-