public EventTable[] Index(IList <EventBean> pollResult, bool isActiveCache)
        {
            if (!isActiveCache)
            {
                return(new EventTable[] { new UnindexedEventTableList(pollResult, _streamNum) });
            }
            var tables = new EventTable[_propertyNames.Length];

            for (var i = 0; i < _propertyNames.Length; i++)
            {
                var factory = new PropertyIndexedEventTableSingleFactory(_streamNum, _eventType, _propertyNames[i], false, null);
                tables[i] = factory.MakeEventTables()[0];
                tables[i].Add(pollResult.ToArray());
            }
            return(tables);
        }
示例#2
0
        public EventTable[] Index(IList <EventBean> pollResult, bool isActiveCache, StatementContext statementContext)
        {
            if (!isActiveCache)
            {
                return(new EventTable[] { new UnindexedEventTableList(pollResult, _streamNum) });
            }
            var tables = new EventTable[_propertyNames.Length];
            var evaluatorContextStatement = new ExprEvaluatorContextStatement(statementContext, false);

            for (var i = 0; i < _propertyNames.Length; i++)
            {
                var factory = new PropertyIndexedEventTableSingleFactory(_streamNum, _eventType, _propertyNames[i], false, null);
                tables[i] = factory.MakeEventTables(new EventTableFactoryTableIdentStmt(statementContext), evaluatorContextStatement)[0];
                tables[i].Add(pollResult.ToArray(), evaluatorContextStatement);
            }
            return(tables);
        }
        public EventTable[] Index(IList <EventBean> pollResult, bool isActiveCache)
        {
            if (!isActiveCache)
            {
                return(new EventTable[]
                {
                    new UnindexedEventTableList(pollResult, _streamNum)
                });
            }
            var factory = new PropertyIndexedEventTableSingleFactory(_streamNum, _eventType, _propertyName, false, null);
            var tables  = factory.MakeEventTables();

            foreach (var table in tables)
            {
                table.Add(pollResult.ToArray());
            }

            return(tables);
        }