Package org.synchronoss.cpo.core
Interface DataSourceInfo<T>
- Type Parameters:
T- The type of the DatasourceInfo
- All Known Implementing Classes:
AbstractDataSourceInfo
public interface DataSourceInfo<T>
Interface that defines the methods needed by CPO for any class that collects DataSource info and
instantiates the DataSource
- Author:
- david.berry
-
Method Summary
Modifier and TypeMethodDescriptionintGets the number of statements to accumulate before executing a batch against this datasource.Gets the underlying datasource object, creating it on first access.Gets the configured name of this datasource, as declared incpoConfig.xml.intGets the number of rows the driver should fetch per round-trip when reading result sets from this datasource.
-
Method Details
-
getDataSourceName
String getDataSourceName()Gets the configured name of this datasource, as declared incpoConfig.xml.- Returns:
- the dataSourceName
-
getFetchSize
int getFetchSize()Gets the number of rows the driver should fetch per round-trip when reading result sets from this datasource.- Returns:
- the fetchSize for this datasource
-
getBatchSize
int getBatchSize()Gets the number of statements to accumulate before executing a batch against this datasource.- Returns:
- the batchSize for this datasource
-
getDataSource
Gets the underlying datasource object, creating it on first access.- Returns:
- the datasource
- Throws:
CpoException- if the datasource cannot be found or created
-