Package com.espertech.esper.epl.agg.service

Examples of com.espertech.esper.epl.agg.service.AggregationStateFactory


        // For match-recognize we don't use the access functions
        if (isMatchRecognize) {
            return null;
        }

        return new AggregationStateFactory() {
            public AggregationState createAccess(MethodResolutionService methodResolutionService, int agentInstanceId, int groupId, int aggregationId, boolean join, Object groupKey) {
                if (join) {
                    return methodResolutionService.makeAccessAggLinearJoin(agentInstanceId, groupId, aggregationId, streamNum);
                }
                return methodResolutionService.makeAccessAggLinearNonJoin(agentInstanceId, groupId, aggregationId, streamNum);
View Full Code Here


        boolean sortUsingCollator = methodResolutionService.isSortUsingCollator();
        Comparator<Object> comparator = CollectionUtil.getComparator(evaluators, sortUsingCollator, sortDescending);
        Object criteriaKeyBinding = methodResolutionService.getCriteriaKeyBinding(evaluators);

        AggregationStateFactory factory;
        if (ever) {
            final AggregationStateMinMaxByEverSpec spec = new AggregationStateMinMaxByEverSpec(streamNum, evaluators, parent.isMax(), comparator, criteriaKeyBinding);
            factory = new AggregationStateFactory() {
                public AggregationState createAccess(MethodResolutionService methodResolutionService, int agentInstanceId, int groupId, int aggregationId, boolean join, Object groupKey) {
                    return methodResolutionService.makeAccessAggMinMaxEver(agentInstanceId, groupId, aggregationId, spec);
                }

                public ExprNode getAggregationExpression() {
                    return parent;
                }
            };
        }
        else {
            final AggregationStateSortedSpec spec = new AggregationStateSortedSpec(streamNum, evaluators, comparator, criteriaKeyBinding);
            factory = new AggregationStateFactory() {
                public AggregationState createAccess(MethodResolutionService methodResolutionService, int agentInstanceId, int groupId, int aggregationId, boolean join, Object groupKey) {
                    if (join) {
                        return methodResolutionService.makeAccessAggSortedJoin(agentInstanceId, groupId, aggregationId, spec);
                    }
                    return methodResolutionService.makeAccessAggSortedNonJoin(agentInstanceId, groupId, aggregationId, spec);
View Full Code Here

TOP

Related Classes of com.espertech.esper.epl.agg.service.AggregationStateFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.