本文整理汇总了Java中com.espertech.esper.client.ConfigurationDBRef.setDriverManagerConnection方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationDBRef.setDriverManagerConnection方法的具体用法?Java ConfigurationDBRef.setDriverManagerConnection怎么用?Java ConfigurationDBRef.setDriverManagerConnection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.client.ConfigurationDBRef
的用法示例。
在下文中一共展示了ConfigurationDBRef.setDriverManagerConnection方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN);
configDB.setConnectionCatalog("test");
configDB.setConnectionReadOnly(true);
configDB.setConnectionTransactionIsolation(1);
configDB.setConnectionAutoCommit(true);
configuration.addDatabaseReference("MyDB", configDB);
}
示例2: getDBConfig
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
protected static ConfigurationDBRef getDBConfig() {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN);
configDB.setConnectionCatalog("test");
configDB.setConnectionReadOnly(true);
configDB.setConnectionAutoCommit(true);
return configDB;
}
示例3: configure
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN);
configuration.getEngineDefaults().getLogging().setEnableQueryPlan(true);
configuration.getEngineDefaults().getLogging().setEnableJDBC(true);
configuration.addDatabaseReference("MyDB", configDB);
}
示例4: configure
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN);
/**
* Turn this cache setting off to turn off indexing since without cache there is no point in indexing.
*/
configDB.setLRUCache(100000);
configuration.getEngineDefaults().getLogging().setEnableQueryPlan(true);
configuration.addDatabaseReference("MyDB", configDB);
}
示例5: configure
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionCatalog("test");
configDB.setExpiryTimeCache(60, 120);
configuration.getEngineDefaults().getLogging().setEnableQueryPlan(true);
configuration.addDatabaseReference("MyDB", configDB);
}
示例6: configure
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.RETAIN);
configDB.setLRUCache(100000);
configDB.setConnectionCatalog("test");
configuration.addDatabaseReference("MyDB", configDB);
}
示例7: setDatasources
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public void setDatasources(List<DataSourceConfig> src) {
if (src != null) {
for (DataSourceConfig ds : src) {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection("com.ebay.jetstream.dal.jdbc.DalJdbcDriver", "_" + ds.getDsName(), null);
//configDB.setDriverManagerConnection(, "_" + ds.getDsName(), null);
configDB.setMetadataOrigin(MetadataOriginEnum.SAMPLE);
configDB.setConnectionLifecycleEnum(ConnectionLifecycleEnum.POOLED);
getDatabaseReferences().put(ds.getEplRefName(), configDB);
}
}
}
示例8: makeDBConfig
import com.espertech.esper.client.ConfigurationDBRef; //导入方法依赖的package包/类
public static ConfigurationDBRef makeDBConfig() {
ConfigurationDBRef configDB = new ConfigurationDBRef();
configDB.setDriverManagerConnection(SupportDatabaseService.DRIVER, SupportDatabaseService.FULLURL, new Properties());
return configDB;
}