com.espertech.esper.epl.join.plan
Class QueryPlanIndex

java.lang.Object
  extended by com.espertech.esper.epl.join.plan.QueryPlanIndex

public class QueryPlanIndex
extends java.lang.Object

Specifies an index to build as part of an overall query plan.


Constructor Summary
QueryPlanIndex(java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> items)
           
 
Method Summary
 java.lang.String addIndex(java.lang.String[] indexProperties, java.lang.Class[] coercionTypes)
          Add an index specification element.
 java.lang.Class[] getCoercionTypes(java.lang.String[] indexProperties)
          Returns a list of coercion types for a given index.
protected  TableLookupIndexReqKey getFirstIndexNum()
           
protected  Pair<TableLookupIndexReqKey,int[]> getIndexNum(java.lang.String[] indexProps, java.lang.String[] rangeProps)
          Find a matching index for the property names supplied.
 java.lang.String[][] getIndexProps()
          For testing - Returns property names of all indexes.
 java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> getItems()
           
static QueryPlanIndex makeIndex(java.util.List<QueryPlanIndexItem> indexesSet)
           
static QueryPlanIndex makeIndex(QueryPlanIndexItem... items)
           
static QueryPlanIndex makeIndexTableAccess(TableLookupIndexReqKey indexName)
           
static java.lang.String print(QueryPlanIndex[] indexSpecs)
          Print index specifications in readable format.
 void setCoercionTypes(java.lang.String[] indexProperties, java.lang.Class[] coercionTypes)
          Sets the coercion types for a given index.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryPlanIndex

public QueryPlanIndex(java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> items)
Method Detail

getItems

public java.util.Map<TableLookupIndexReqKey,QueryPlanIndexItem> getItems()

makeIndex

public static QueryPlanIndex makeIndex(QueryPlanIndexItem... items)

makeIndex

public static QueryPlanIndex makeIndex(java.util.List<QueryPlanIndexItem> indexesSet)

getIndexNum

protected Pair<TableLookupIndexReqKey,int[]> getIndexNum(java.lang.String[] indexProps,
                                                         java.lang.String[] rangeProps)
Find a matching index for the property names supplied.

Parameters:
indexProps - - property names to search for
Returns:
-1 if not found, or offset within indexes if found

getFirstIndexNum

protected TableLookupIndexReqKey getFirstIndexNum()

addIndex

public java.lang.String addIndex(java.lang.String[] indexProperties,
                                 java.lang.Class[] coercionTypes)
Add an index specification element.

Parameters:
indexProperties - - list of property names to index
coercionTypes - - list of coercion types if required, or null if no coercion required
Returns:
number indicating position of index that was added

getIndexProps

public java.lang.String[][] getIndexProps()
For testing - Returns property names of all indexes.

Returns:
property names array

getCoercionTypes

public java.lang.Class[] getCoercionTypes(java.lang.String[] indexProperties)
Returns a list of coercion types for a given index.

Parameters:
indexProperties - is the index field names
Returns:
coercion types, or null if no coercion is required

setCoercionTypes

public void setCoercionTypes(java.lang.String[] indexProperties,
                             java.lang.Class[] coercionTypes)
Sets the coercion types for a given index.

Parameters:
indexProperties - is the index property names
coercionTypes - is the coercion types

toString

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

print

public static java.lang.String print(QueryPlanIndex[] indexSpecs)
Print index specifications in readable format.

Parameters:
indexSpecs - - define indexes
Returns:
readable format of index info

makeIndexTableAccess

public static QueryPlanIndex makeIndexTableAccess(TableLookupIndexReqKey indexName)

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