net.esper.eql.db
Interface DatabaseConfigService

All Known Implementing Classes:
DatabaseConfigServiceImpl

public interface DatabaseConfigService

Service providing database connection factory and configuration information for use with historical data polling.


Method Summary
 ConnectionCache getConnectionCache(String databaseName, String preparedStatementText)
          Returns true to indicate a setting to retain connections between lookups.
 DatabaseConnectionFactory getConnectionFactory(String databaseName)
          Returns a connection factory for a configured database.
 DataCache getDataCache(String databaseName, EPStatementHandle epStatementHandle)
          Returns a new cache implementation for this database.
 

Method Detail

getConnectionFactory

DatabaseConnectionFactory getConnectionFactory(String databaseName)
                                               throws DatabaseConfigException
Returns a connection factory for a configured database.

Parameters:
databaseName - is the name of the database
Returns:
is a connection factory to use to get connections to the database
Throws:
DatabaseConfigException - is thrown to indicate database configuration errors

getConnectionCache

ConnectionCache getConnectionCache(String databaseName,
                                   String preparedStatementText)
                                   throws DatabaseConfigException
Returns true to indicate a setting to retain connections between lookups.

Parameters:
databaseName - is the name of the database
preparedStatementText - is the sql text
Returns:
a cache implementation to cache connection and prepared statements
Throws:
DatabaseConfigException - is thrown to indicate database configuration errors

getDataCache

DataCache getDataCache(String databaseName,
                       EPStatementHandle epStatementHandle)
                       throws DatabaseConfigException
Returns a new cache implementation for this database.

Parameters:
databaseName - is the name of the database to return a new cache implementation for for
epStatementHandle - is the statements-own handle for use in registering callbacks with services
Returns:
cache implementation
Throws:
DatabaseConfigException - is thrown to indicate database configuration errors