Example #1
0
        public NamedWindowRootViewInstance(
            NamedWindowRootView rootView,
            AgentInstanceContext agentInstanceContext,
            EventTableIndexMetadata eventTableIndexMetadata)
        {
            this.rootView = rootView;
            AgentInstanceContext = agentInstanceContext;

            IndexRepository = new EventTableIndexRepository(eventTableIndexMetadata);
            foreach (var entry in eventTableIndexMetadata.Indexes
            ) {
                if (entry.Value.OptionalQueryPlanIndexItem != null) {
                    var index = EventTableUtil.BuildIndex(
                        agentInstanceContext,
                        0,
                        entry.Value.OptionalQueryPlanIndexItem,
                        rootView.EventType,
                        true,
                        entry.Key.IsUnique,
                        entry.Value.OptionalIndexName,
                        null,
                        false);
                    IndexRepository.AddIndex(
                        entry.Key,
                        new EventTableIndexRepositoryEntry(
                            entry.Value.OptionalIndexName,
                            entry.Value.OptionalIndexModuleName,
                            index));
                }
            }
        }
        public NamedWindowRootViewInstance(NamedWindowRootView rootView, AgentInstanceContext agentInstanceContext, EventTableIndexMetadata eventTableIndexMetadata)
        {
            _rootView             = rootView;
            _agentInstanceContext = agentInstanceContext;

            _indexRepository = new EventTableIndexRepository();
            foreach (KeyValuePair <IndexMultiKey, EventTableIndexMetadataEntry> entry in eventTableIndexMetadata.Indexes)
            {
                if (entry.Value.QueryPlanIndexItem != null)
                {
                    EventTable index = EventTableUtil.BuildIndex(agentInstanceContext, 0, entry.Value.QueryPlanIndexItem, rootView.EventType, true, entry.Key.IsUnique, entry.Value.OptionalIndexName, null, false);
                    _indexRepository.AddIndex(entry.Key, new EventTableIndexRepositoryEntry(entry.Value.OptionalIndexName, index));
                }
            }

            _tablePerMultiLookup = new Dictionary <SubordWMatchExprLookupStrategy, EventTable[]>();
        }