public class DatabaseConfigServiceImpl extends Object implements DatabaseConfigServiceCompileTime, DatabaseConfigServiceRuntime
Constructor and Description |
---|
DatabaseConfigServiceImpl(Map<String,ConfigurationCommonDBRef> mapDatabaseRef,
ClasspathImportService classpathImportService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
ConnectionCache |
getConnectionCache(String databaseName,
String preparedStatementText) |
DatabaseConnectionFactory |
getConnectionFactory(String databaseName)
Returns a connection factory for a configured database.
|
HistoricalDataCache |
getDataCache(String databaseName,
AgentInstanceContext agentInstanceContext,
int streamNumber,
int scheduleCallbackId)
Returns a new cache implementation for this database.
|
ColumnSettings |
getQuerySetting(String databaseName)
Returns the column metadata settings for the database.
|
public DatabaseConfigServiceImpl(Map<String,ConfigurationCommonDBRef> mapDatabaseRef, ClasspathImportService classpathImportService)
mapDatabaseRef
- is a map of database name and database configuration entriesclasspathImportService
- importspublic DatabaseConnectionFactory getConnectionFactory(String databaseName) throws DatabaseConfigException
DatabaseConfigService
getConnectionFactory
in interface DatabaseConfigService
databaseName
- is the name of the databaseDatabaseConfigException
- is thrown to indicate database configuration errorspublic ColumnSettings getQuerySetting(String databaseName) throws DatabaseConfigException
DatabaseConfigServiceCompileTime
getQuerySetting
in interface DatabaseConfigServiceCompileTime
databaseName
- is the database nameDatabaseConfigException
- if the name was not configuredpublic HistoricalDataCache getDataCache(String databaseName, AgentInstanceContext agentInstanceContext, int streamNumber, int scheduleCallbackId) throws DatabaseConfigException
DatabaseConfigServiceRuntime
getDataCache
in interface DatabaseConfigServiceRuntime
databaseName
- is the name of the database to return a new cache implementation for foragentInstanceContext
- agent instance contextstreamNumber
- stream numberscheduleCallbackId
- callback idDatabaseConfigException
- is thrown to indicate database configuration errorspublic ConnectionCache getConnectionCache(String databaseName, String preparedStatementText) throws DatabaseConfigException
getConnectionCache
in interface DatabaseConfigServiceRuntime
DatabaseConfigException
Copyright © 2005–2018. All rights reserved.