Exemplo n.º 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);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 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>();
        }