当前位置: 首页>>代码示例>>Java>>正文


Java Configuration.addDatabaseReference方法代码示例

本文整理汇总了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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:ExecMTStmtDatabaseJoin.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:ExecDatabase3StreamOuterJoin.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:16,代码来源:ExecDatabaseDataSourceFactory.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:13,代码来源:ExecDatabaseJoinPerfWithCache.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:10,代码来源:ExecDatabaseOuterJoinWCache.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:ExecDatabaseNoJoinIteratePerf.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:ExecDatabaseJoinOptionUppercase.java

示例8: configure

import com.espertech.esper.client.Configuration; //导入方法依赖的package包/类
public void configure(Configuration configuration) throws Exception {
    ConfigurationDBRef dbconfig = getDBConfig();
    configuration.addDatabaseReference("MyDB", dbconfig);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:5,代码来源:ExecDatabaseJoinOptions.java

示例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);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:ExecDatabaseJoinOptionLowercase.java


注:本文中的com.espertech.esper.client.Configuration.addDatabaseReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。