Class DBCPDataSource
- Object
-
- AbstractManageableDataSource
-
- DBCPDataSource
-
- All Implemented Interfaces:
AutoCloseable
,Wrapper
,CommonDataSource
,DataSource
,ManageableDataSource
public class DBCPDataSource extends AbstractManageableDataSource
A closeable wrapper aroundBasicDataSource
- Author:
- Administrator
-
-
Field Summary
-
Fields inherited from class AbstractManageableDataSource
wrapped
-
-
Constructor Summary
Constructors Constructor Description DBCPDataSource(BasicDataSource wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes up the datasource, frees all of its resources.DataSource
getWrapped()
boolean
isWrapperFor(Class c)
<T> T
unwrap(Class<T> c)
-
Methods inherited from class AbstractManageableDataSource
getConnection, getConnection, getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface DataSource
createConnectionBuilder
-
-
-
-
Method Detail
-
getWrapped
public DataSource getWrapped()
-
close
public void close() throws SQLException
Description copied from interface:ManageableDataSource
Closes up the datasource, frees all of its resources. No other connection can be gathered from this DataSource once close() has been called- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class c) throws SQLException
- Specified by:
isWrapperFor
in interfaceWrapper
- Overrides:
isWrapperFor
in classAbstractManageableDataSource
- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> c) throws SQLException
- Specified by:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classAbstractManageableDataSource
- Throws:
SQLException
-
-