From 88d75d3e6f889871ceb18aaa65c0fb058d80af78 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Wed, 14 Aug 2019 21:32:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=B8=80=E4=B8=AA=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=B1=A0(=E6=9C=AA=E5=AE=8C=E6=88=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/panda/jdbc/pool/JdbcPool.java | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java diff --git a/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java b/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java new file mode 100644 index 0000000..dc5b324 --- /dev/null +++ b/panda-jdbc/src/main/java/org/panda/jdbc/pool/JdbcPool.java @@ -0,0 +1,111 @@ +package org.panda.jdbc.pool; + +import javax.sql.DataSource; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; +import java.util.logging.Logger; + +/** + * @Author: qi + * @Description:自定义数据库连接池 + * @Date: Create in 9:54 AM 2019/8/14 + */ +public class JdbcPool implements DataSource { + + /** + * 获取连接 + * @return + * @throws SQLException + */ + @Override + public Connection getConnection() throws SQLException { + return null; + } + + /** + * 获取连接 + * @param username + * @param password + * @return + * @throws SQLException + */ + @Override + public Connection getConnection(String username, String password) throws SQLException { + return null; + } + + /** + * 拆开 + * @param iface + * @param + * @return + * @throws SQLException + */ + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + /** + * 是否包装 + * @param iface + * @return + * @throws SQLException + */ + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + /** + * 获取日志编写器 + * @return + * @throws SQLException + */ + @Override + public PrintWriter getLogWriter() throws SQLException { + return null; + } + + /** + * 设置日志编写器 + * @param out + * @throws SQLException + */ + @Override + public void setLogWriter(PrintWriter out) throws SQLException { + + } + + /** + * 设置逻辑超时 + * @param seconds + * @throws SQLException + */ + @Override + public void setLoginTimeout(int seconds) throws SQLException { + + } + + /** + * 获取登录超时 + * @return + * @throws SQLException + */ + @Override + public int getLoginTimeout() throws SQLException { + return 0; + } + + /** + * 获取父记录器 + * @return + * @throws SQLFeatureNotSupportedException + */ + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + return null; + } +}