From 072af7faaef9d5f80711ed7c8b4da789719afd8c Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Mon, 19 Jul 2021 10:44:29 +0800 Subject: [PATCH] datasource --- .../modules/dataSource/pool/api/IConfig.java | 39 -------- .../pool/api/IDataSourceConfig.java | 13 --- .../dataSource/pool/api/ILifeCycle.java | 21 ----- .../pool/api/IPooledDataSourceConfig.java | 93 ------------------- 4 files changed, 166 deletions(-) delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java delete mode 100644 report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java deleted file mode 100644 index 8fd16e0f..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; - -/** - * 配置接口 - * @author binbin.hou - * @since 1.0.0 - */ -public interface IConfig { - - /** - * 设置驱动类 - * - * @param driverClass 驱动类 - * @since 1.0.0 - */ - void setDriverClass(final String driverClass); - - /** - * jdbc url - * @param jdbcUrl url - * @since 1.0.0 - */ - void setJdbcUrl(final String jdbcUrl); - - /** - * 设置用户信息 - * @param user 用户信息 - * @since 1.0.0 - */ - void setUser(final String user); - - /** - * 设置密码 - * @param password 密码 - * @since 1.0.0 - */ - void setPassword(final String password); - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java deleted file mode 100644 index 74dc45aa..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IDataSourceConfig.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; - -import javax.sql.DataSource; - -/** - * 配置接口 - * @author binbin.hou - * @since 1.0.0 - */ -public interface IDataSourceConfig extends IConfig, DataSource { - - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java deleted file mode 100644 index 21b4b63f..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/ILifeCycle.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; - -/** - * 生命周期管理 - * @since 1.1.0 - */ -public interface ILifeCycle { - - /** - * 生命的初始化 - * @since 1.1.0 - */ - void init(); - - /** - * 生命的销毁 - * @since 1.1.0 - */ - void destroy(); - -} diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java deleted file mode 100644 index 8db6078d..00000000 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/dataSource/pool/api/IPooledDataSourceConfig.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.anjiplus.template.gaea.business.modules.dataSource.pool.api; - -import com.anjiplus.template.gaea.business.modules.dataSource.pool.connection.IPooledConnection; - -/** - * 池化的接口 - * @author binbin.hou - * @since 1.0.0 - */ -public interface IPooledDataSourceConfig extends IDataSourceConfig { - - /** - * 归还连接 - * @param pooledConnection 连接池信息 - * @since 1.5.0 - */ - void returnConnection(IPooledConnection pooledConnection); - - /** - * 设置最小尺寸 - * - * @param minSize 大小 - * @since 1.1.0 - */ - void setMinSize(final int minSize); - - /** - * 设置最大的大小 - * - * @param maxSize 最大的大小 - * @since 1.1.0 - */ - void setMaxSize(final int maxSize); - - /** - * 设置最大的等待时间 - * @param maxWaitMills 最大的等待时间 - * @since 1.1.0 - */ - void setMaxWaitMills(final long maxWaitMills); - - /** - * 设置验证查询的语句 - * - * 如果这个值为空,那么 {@link #setTestOnBorrow(boolean)} - * {@link #setTestOnIdle(boolean)}} - * {@link #setTestOnReturn(boolean)} - * 都将无效 - * @param validQuery 验证查询的语句 - * @since 1.5.0 - */ - void setValidQuery(final String validQuery); - - /** - * 验证的超时秒数 - * @param validTimeOutSeconds 验证的超时秒数 - * @since 1.5.0 - */ - void setValidTimeOutSeconds(final int validTimeOutSeconds); - - /** - * 获取连接时进行校验 - * - * 备注:影响性能 - * @param testOnBorrow 是否 - * @since 1.5.0 - */ - void setTestOnBorrow(final boolean testOnBorrow); - - /** - * 归还连接时进行校验 - * - * 备注:影响性能 - * @param testOnReturn 归还连接时进行校验 - * @since 1.5.0 - */ - void setTestOnReturn(final boolean testOnReturn); - - /** - * 闲暇的时候进行校验 - * @param testOnIdle 闲暇的时候进行校验 - * @since 1.5.0 - */ - void setTestOnIdle(final boolean testOnIdle); - - /** - * 闲暇时进行校验的时间间隔 - * @param testOnIdleIntervalSeconds 时间间隔 - * @since 1.5.0 - */ - void setTestOnIdleIntervalSeconds(final long testOnIdleIntervalSeconds); - -}