com.espertech.esper.epl.join.exec.base
Class SortedTableLookupStrategy

java.lang.Object
  extended by com.espertech.esper.epl.join.exec.base.SortedTableLookupStrategy
All Implemented Interfaces:
JoinExecTableLookupStrategy

public class SortedTableLookupStrategy
extends java.lang.Object
implements JoinExecTableLookupStrategy

Lookup on an index that is a sorted index on a single property queried as a range.

Use the composite strategy if supporting multiple ranges or if range is in combination with unique key.


Constructor Summary
SortedTableLookupStrategy(int lookupStream, int numStreams, QueryGraphValueEntryRange rangeKeyPair, java.lang.Class coercionType, PropertySortedEventTable index)
          Ctor.
 
Method Summary
 PropertySortedEventTable getIndex()
          Returns index to look up in.
 LookupStrategyDesc getStrategyDesc()
           
 java.util.Set<EventBean> lookup(EventBean theEvent, Cursor cursor, ExprEvaluatorContext exprEvaluatorContext)
          Returns matched events for a event to look up for.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortedTableLookupStrategy

public SortedTableLookupStrategy(int lookupStream,
                                 int numStreams,
                                 QueryGraphValueEntryRange rangeKeyPair,
                                 java.lang.Class coercionType,
                                 PropertySortedEventTable index)
Ctor.

Parameters:
index - - index to look up in
Method Detail

getIndex

public PropertySortedEventTable getIndex()
Returns index to look up in.

Returns:
index to use

lookup

public java.util.Set<EventBean> lookup(EventBean theEvent,
                                       Cursor cursor,
                                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: JoinExecTableLookupStrategy
Returns matched events for a event to look up for. Never returns an empty result set, always returns null to indicate no results.

Specified by:
lookup in interface JoinExecTableLookupStrategy
Parameters:
theEvent - to look up
cursor - the path in the query that the lookup took
exprEvaluatorContext - expression evaluation context
Returns:
set of matching events, or null if none matching

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStrategyDesc

public LookupStrategyDesc getStrategyDesc()
Specified by:
getStrategyDesc in interface JoinExecTableLookupStrategy

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