Beispiel #1
0
        /// <summary>
        ///     NOTE: Code-generation-invoked method, method name and parameter order matters
        /// </summary>
        /// <param name="joinExecutionStrategy">join strategy</param>
        /// <param name="resultSetProcessor">processor</param>
        /// <param name="parentView">view</param>
        /// <param name="distinct">flag</param>
        /// <param name="distinctKeyGetter"></param>
        /// <returns>iterator</returns>
        public static IEnumerator<EventBean> GetEnumerator(
            JoinExecutionStrategy joinExecutionStrategy,
            ResultSetProcessor resultSetProcessor,
            Viewable parentView,
            bool distinct,
            EventPropertyValueGetter distinctKeyGetter)
        {
            IEnumerator<EventBean> enumerator;
            if (joinExecutionStrategy != null) {
                var joinSet = joinExecutionStrategy.StaticJoin();
                enumerator = resultSetProcessor.GetEnumerator(joinSet);
            }
            else if (resultSetProcessor != null) {
                enumerator = resultSetProcessor.GetEnumerator(parentView);
            }
            else {
                enumerator = parentView.GetEnumerator();
            }

            if (!distinct) {
                return enumerator;
            }

            return EventDistinctEnumerator.For(enumerator, distinctKeyGetter);
        }
        public static IEnumerator <EventBean> GetEnumerator(JoinExecutionStrategy joinExecutionStrategy, ResultSetProcessor resultSetProcessor, Viewable parentView, bool distinct)
        {
            IEnumerator <EventBean> enumerator;
            EventType eventType;

            if (joinExecutionStrategy != null)
            {
                var joinSet = joinExecutionStrategy.StaticJoin();
                enumerator = resultSetProcessor.GetEnumerator(joinSet);
                eventType  = resultSetProcessor.ResultEventType;
            }
            else if (resultSetProcessor != null)
            {
                enumerator = resultSetProcessor.GetEnumerator(parentView);
                eventType  = resultSetProcessor.ResultEventType;
            }
            else
            {
                enumerator = parentView.GetEnumerator();
                eventType  = parentView.EventType;
            }

            if (!distinct)
            {
                return(enumerator);
            }

            return(DistinctEnumeration(enumerator, eventType));
        }
Beispiel #3
0
        /// <summary>CTor. </summary>
        /// <param name="joinExecutionStrategy">strategy for executing the join</param>
        /// <param name="numStreams">number of stream</param>
        public JoinExecStrategyDispatchable(JoinExecutionStrategy joinExecutionStrategy, int numStreams)
        {
            _joinExecutionStrategy = joinExecutionStrategy;
            _numStreams            = numStreams;

            _oldStreamBuffer = new Dictionary <int, FlushedEventBuffer>();
            _newStreamBuffer = new Dictionary <int, FlushedEventBuffer>();
        }
        public JoinExecStrategyDispatchable(
            JoinExecutionStrategy joinExecutionStrategy,
            int numStreams,
            AgentInstanceContext agentInstanceContext)
        {
            this.joinExecutionStrategy = joinExecutionStrategy;
            this.numStreams = numStreams;
            this.agentInstanceContext = agentInstanceContext;

            oldStreamBuffer = new Dictionary<int, FlushedEventBuffer>();
            newStreamBuffer = new Dictionary<int, FlushedEventBuffer>();
        }