Class AbstractManageableDataSource
Object
AbstractManageableDataSource
- All Implemented Interfaces:
AutoCloseable
,Wrapper
,CommonDataSource
,DataSource
,ManageableDataSource
- Direct Known Subclasses:
DBCPDataSource
An abstract wrapper created to ease the setup of a
ManageableDataSource
, you just have to subclass and create
a close method- Author:
- Andrea Aime - TOPP
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConnection
(String username, String password) int
boolean
void
setLoginTimeout
(int seconds) void
setLogWriter
(PrintWriter out) <T> T
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
Methods inherited from interface ManageableDataSource
close
-
Field Details
-
wrapped
-
-
Constructor Details
-
AbstractManageableDataSource
-
-
Method Details
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDataSource
- Throws:
SQLException
-
getLoginTimeout
- Specified by:
getLoginTimeout
in interfaceCommonDataSource
- Specified by:
getLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
getLogWriter
- Specified by:
getLogWriter
in interfaceCommonDataSource
- Specified by:
getLogWriter
in interfaceDataSource
- Throws:
SQLException
-
setLoginTimeout
- Specified by:
setLoginTimeout
in interfaceCommonDataSource
- Specified by:
setLoginTimeout
in interfaceDataSource
- Throws:
SQLException
-
setLogWriter
- Specified by:
setLogWriter
in interfaceCommonDataSource
- Specified by:
setLogWriter
in interfaceDataSource
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLogger
in interfaceCommonDataSource
- Throws:
SQLFeatureNotSupportedException
-