com.espertech.esper.epl.core
Class OrderByProcessorFactoryImpl

java.lang.Object
  extended by com.espertech.esper.epl.core.OrderByProcessorFactoryImpl
All Implemented Interfaces:
OrderByProcessorFactory

public class OrderByProcessorFactoryImpl
extends java.lang.Object
implements OrderByProcessorFactory

An order-by processor that sorts events according to the expressions in the order_by clause.


Constructor Summary
OrderByProcessorFactoryImpl(java.util.List<OrderByItem> orderByList, ExprNode[] groupByNodes, boolean needsGroupByKeys, boolean isSortUsingCollator)
          Ctor.
 
Method Summary
 java.util.Comparator<java.lang.Object> getComparator()
           
protected static java.util.Comparator<java.lang.Object> getComparator(OrderByElement[] orderBy, boolean isSortUsingCollator)
          Returns a comparator for order items that may sort string values using Collator.
 ExprEvaluator[] getGroupByNodes()
           
 OrderByElement[] getOrderBy()
           
 OrderByProcessor instantiate(AggregationService aggregationService, AgentInstanceContext agentInstanceContext)
           
 boolean isNeedsGroupByKeys()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderByProcessorFactoryImpl

public OrderByProcessorFactoryImpl(java.util.List<OrderByItem> orderByList,
                                   ExprNode[] groupByNodes,
                                   boolean needsGroupByKeys,
                                   boolean isSortUsingCollator)
                            throws ExprValidationException
Ctor.

Parameters:
orderByList - - the nodes that generate the keys to sort events on
groupByNodes - - generate the keys for determining aggregation groups
needsGroupByKeys - - indicates whether this processor needs to have individual group by keys to evaluate the sort condition successfully
isSortUsingCollator - for string value sorting using compare or Collator
Throws:
ExprValidationException - when order-by items don't divulge a type
Method Detail

instantiate

public OrderByProcessor instantiate(AggregationService aggregationService,
                                    AgentInstanceContext agentInstanceContext)
Specified by:
instantiate in interface OrderByProcessorFactory

getOrderBy

public OrderByElement[] getOrderBy()

getGroupByNodes

public ExprEvaluator[] getGroupByNodes()

isNeedsGroupByKeys

public boolean isNeedsGroupByKeys()

getComparator

public java.util.Comparator<java.lang.Object> getComparator()

getComparator

protected static java.util.Comparator<java.lang.Object> getComparator(OrderByElement[] orderBy,
                                                                      boolean isSortUsingCollator)
                                                               throws ExprValidationException
Returns a comparator for order items that may sort string values using Collator.

Parameters:
orderBy - order-by items
isSortUsingCollator - true for Collator string sorting
Returns:
comparator
Throws:
ExprValidationException - if the return type of order items cannot be determined

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com