com.espertech.esper.epl.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(java.lang.String databaseName, java.lang.String preparedStatementText)
          Returns true to indicate a setting to retain connections between lookups.
 DatabaseConnectionFactory getConnectionFactory(java.lang.String databaseName)
          Returns a connection factory for a configured database.
 DataCache getDataCache(java.lang.String databaseName, EPStatementAgentInstanceHandle epStatementAgentInstanceHandle)
          Returns a new cache implementation for this database.
 ColumnSettings getQuerySetting(java.lang.String databaseName)
          Returns the column metadata settings for the database.
 

Method Detail

getConnectionFactory

DatabaseConnectionFactory getConnectionFactory(java.lang.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

getQuerySetting

ColumnSettings getQuerySetting(java.lang.String databaseName)
                               throws DatabaseConfigException
Returns the column metadata settings for the database.

Parameters:
databaseName - is the database name
Returns:
indicators for change case, metadata retrieval strategy and others
Throws:
DatabaseConfigException - if the name was not configured

getConnectionCache

ConnectionCache getConnectionCache(java.lang.String databaseName,
                                   java.lang.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(java.lang.String databaseName,
                       EPStatementAgentInstanceHandle epStatementAgentInstanceHandle)
                       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
epStatementAgentInstanceHandle - is the statements-own handle for use in registering callbacks with services
Returns:
cache implementation
Throws:
DatabaseConfigException - is thrown to indicate database configuration errors

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com