Package org.synchronoss.cpo.jdbc
Class ClassJdbcDataSourceInfo
java.lang.Object
org.synchronoss.cpo.core.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
org.synchronoss.cpo.jdbc.ClassJdbcDataSourceInfo
- All Implemented Interfaces:
AutoCloseable,Wrapper,EventListener,CommonDataSource,ConnectionEventListener,DataSource,DataSourceInfo
public class ClassJdbcDataSourceInfo
extends AbstractJdbcDataSource
implements ConnectionEventListener, AutoCloseable
Collects the info required to instantiate a DataSource from a JDBC Driver Provides the
DataSourceInfo factory method getDataSource which instantiates the DataSource
- Author:
- dberry
-
Constructor Summary
ConstructorsConstructorDescriptionClassJdbcDataSourceInfo(String className, SortedMap<String, String> properties, int fetchSize, int batchSize) Creates a ClassJdbcDataSourceInfo from a Jdbc Driver -
Method Summary
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
getConnection, getLoginTimeout, getLogWriter, getParentLogger, isWrapperFor, setLoginTimeout, setLogWriter, unwrapMethods inherited from class org.synchronoss.cpo.core.AbstractDataSourceInfo
getBatchSize, getDataSource, getDataSourceName, getFetchSizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Constructor Details
-
ClassJdbcDataSourceInfo
public ClassJdbcDataSourceInfo(String className, SortedMap<String, String> properties, int fetchSize, int batchSize) Creates a ClassJdbcDataSourceInfo from a Jdbc Driver- Parameters:
className- The classname of a class that implements datasourceproperties- - The connection properties for connecting to the databasefetchSize- the number of rows to fetch per round trip on a retrievebatchSize- the number of statements to batch together before executing
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
toString
-
connectionClosed
- Specified by:
connectionClosedin interfaceConnectionEventListener
-
connectionErrorOccurred
- Specified by:
connectionErrorOccurredin interfaceConnectionEventListener
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-