Class JDBCHikariCPClient
- java.lang.Object
-
- org.apache.skywalking.oap.server.library.client.jdbc.hikaricp.JDBCHikariCPClient
-
- All Implemented Interfaces:
Client,HealthCheckable
public class JDBCHikariCPClient extends Object implements Client, HealthCheckable
JDBC Client uses HikariCP connection management lib to execute SQL.
-
-
Constructor Summary
Constructors Constructor Description JDBCHikariCPClient(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()voidexecute(Connection connection, String sql)ResultSetexecuteQuery(Connection connection, String sql, Object... params)intexecuteUpdate(Connection connection, String sql, Object... params)ConnectiongetConnection()Default getConnection is set in auto-commit.ConnectiongetConnection(boolean autoCommit)voidregisterChecker(HealthChecker healthChecker)Register health checker.voidshutdown()
-
-
-
Constructor Detail
-
JDBCHikariCPClient
public JDBCHikariCPClient(Properties properties)
-
-
Method Detail
-
getConnection
public Connection getConnection() throws JDBCClientException
Default getConnection is set in auto-commit.- Throws:
JDBCClientException
-
getConnection
public Connection getConnection(boolean autoCommit) throws JDBCClientException
- Throws:
JDBCClientException
-
execute
public void execute(Connection connection, String sql) throws JDBCClientException
- Throws:
JDBCClientException
-
executeUpdate
public int executeUpdate(Connection connection, String sql, Object... params) throws JDBCClientException
- Throws:
JDBCClientException
-
executeQuery
public ResultSet executeQuery(Connection connection, String sql, Object... params) throws JDBCClientException
- Throws:
JDBCClientException
-
registerChecker
public void registerChecker(HealthChecker healthChecker)
Description copied from interface:HealthCheckableRegister health checker.- Specified by:
registerCheckerin interfaceHealthCheckable- Parameters:
healthChecker- HealthChecker to be registered.
-
-