Package com.impossibl.jdbc.spy
Class ConnectionPoolDataSourceRelay
- java.lang.Object
-
- com.impossibl.jdbc.spy.ConnectionPoolDataSourceRelay
-
- All Implemented Interfaces:
Relay<ConnectionPoolDataSource>
,CommonDataSource
,ConnectionPoolDataSource
public class ConnectionPoolDataSourceRelay extends Object implements Relay<ConnectionPoolDataSource>, ConnectionPoolDataSource
-
-
Field Summary
Fields Modifier and Type Field Description com.impossibl.jdbc.spy.ConnectionPoolDataSourceListener
listener
ConnectionPoolDataSource
target
-
Constructor Summary
Constructors Constructor Description ConnectionPoolDataSourceRelay(ConnectionPoolDataSource target, com.impossibl.jdbc.spy.ConnectionPoolDataSourceListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLoginTimeout()
PrintWriter
getLogWriter()
Logger
getParentLogger()
PooledConnection
getPooledConnection()
PooledConnection
getPooledConnection(String user, String password)
ConnectionPoolDataSource
getTarget()
void
setLoginTimeout(int seconds)
void
setLogWriter(PrintWriter out)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.ConnectionPoolDataSource
createPooledConnectionBuilder
-
-
-
-
Field Detail
-
target
public ConnectionPoolDataSource target
-
listener
public com.impossibl.jdbc.spy.ConnectionPoolDataSourceListener listener
-
-
Constructor Detail
-
ConnectionPoolDataSourceRelay
public ConnectionPoolDataSourceRelay(ConnectionPoolDataSource target, com.impossibl.jdbc.spy.ConnectionPoolDataSourceListener listener)
-
-
Method Detail
-
getTarget
public ConnectionPoolDataSource getTarget()
- Specified by:
getTarget
in interfaceRelay<ConnectionPoolDataSource>
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException
- Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getPooledConnection
public PooledConnection getPooledConnection(String user, String password) throws SQLException
- Specified by:
getPooledConnection
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout() throws SQLException
- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getPooledConnection
public PooledConnection getPooledConnection() throws SQLException
- Specified by:
getPooledConnection
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Throws:
SQLFeatureNotSupportedException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceConnectionPoolDataSource
- Throws:
SQLException
-
-