Example #1
0
 public PollExecStrategyDBQuery(
     HistoricalEventViewableDatabaseFactory factory,
     AgentInstanceContext agentInstanceContext,
     ConnectionCache connectionCache)
 {
     _factory = factory;
     _agentInstanceContext = agentInstanceContext;
     _connectionCache = connectionCache;
     _dbInfoList = null;
     _outputTypes = factory.OutputTypes;
     _columnTypeConversionHook = factory.ColumnTypeConversionHook;
     _outputRowConversionHook = factory.OutputRowConversionHook;
 }
Example #2
0
        public override HistoricalEventViewable Activate(AgentInstanceContext agentInstanceContext)
        {
            ConnectionCache connectionCache = null;
            try {
                connectionCache =
                    agentInstanceContext.DatabaseConfigService.GetConnectionCache(
                        DatabaseName,
                        PreparedStatementText,
                        ContextAttributes);
            }
            catch (DatabaseConfigException e) {
                throw new EPException("Failed to obtain connection cache: " + e.Message, e);
            }

            var pollExecStrategy = new PollExecStrategyDBQuery(this, agentInstanceContext, connectionCache);
            return new HistoricalEventViewableDatabase(this, pollExecStrategy, agentInstanceContext);
        }