Interface DataSourceInfo<T>

Type Parameters:
T - The type of the DatasourceInfo
All Known Implementing Classes:
AbstractDataSourceInfo, AbstractJdbcDataSource, AbstractJdbcDataSourceInfo, ClassJdbcDataSourceInfo, ClusterDataSourceInfo, DriverJdbcDataSourceInfo, JndiJdbcDataSourceInfo

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 Type
    Method
    Description
    int
    Gets 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 in cpoConfig.xml.
    int
    Gets 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 in cpoConfig.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

      T getDataSource() throws CpoException
      Gets the underlying datasource object, creating it on first access.
      Returns:
      the datasource
      Throws:
      CpoException - if the datasource cannot be found or created