本文整理汇总了Java中com.espertech.esper.client.Configuration.addDatabaseReference方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.addDatabaseReference方法的具体用法?Java Configuration.addDatabaseReference怎么用?Java Configuration.addDatabaseReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.client.Configuration
的用法示例。
在下文中一共展示了Configuration.addDatabaseReference方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的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: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的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);
}
示例3: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
Properties props = new Properties();
props.put("driverClassName", SupportDatabaseService.DRIVER);
props.put("url", SupportDatabaseService.FULLURL);
props.put("username", SupportDatabaseService.DBUSER);
props.put("password", SupportDatabaseService.DBPWD);
ConfigurationDBRef configDB = new ConfigurationDBRef();
// for DBCP, use setDataSourceFactoryDBCP
configDB.setDataSourceFactory(props, SupportDataSourceFactory.class.getName());
configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.POOLED);
configDB.setLRUCache(100);
configuration.addDatabaseReference("MyDB", configDB);
}
示例4: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的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.Configuration; //导入方法依赖的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.Configuration; //导入方法依赖的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: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef dbconfig = getDBConfig();
dbconfig.setColumnChangeCase(ConfigurationDBRef.ColumnChangeCaseEnum.UPPERCASE);
configuration.addDatabaseReference("MyDB", dbconfig);
configuration.getEngineDefaults().getLogging().setEnableExecutionDebug(true);
}
示例8: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef dbconfig = getDBConfig();
configuration.addDatabaseReference("MyDB", dbconfig);
}
示例9: configure
import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
ConfigurationDBRef dbconfig = getDBConfig();
dbconfig.setColumnChangeCase(ConfigurationDBRef.ColumnChangeCaseEnum.LOWERCASE);
dbconfig.addSqlTypesBinding(java.sql.Types.INTEGER, "string");
configuration.addDatabaseReference("MyDB", dbconfig);
}