예제 #1
0
  private Configuration getConfig(
      long engineMetricInterval, long stmtMetricInterval, boolean shareViews) {
    Configuration configuration = SupportConfigFactory.getConfiguration();
    configuration.getEngineDefaults().getViewResources().setShareViews(shareViews);
    configuration.getEngineDefaults().getMetricsReporting().setEnableMetricsReporting(true);
    configuration.getEngineDefaults().getMetricsReporting().setThreading(false);
    configuration.getEngineDefaults().getMetricsReporting().setEngineInterval(engineMetricInterval);
    configuration
        .getEngineDefaults()
        .getMetricsReporting()
        .setStatementInterval(stmtMetricInterval);

    configuration.addImport(MyMetricFunctions.class.getName());

    configuration.addEventType("SupportBean", SupportBean.class);

    return configuration;
  }
 @Override
 public void addImport(Class arg0) throws ConfigurationException {
   m_esperconfig.addImport(arg0);
 }