com.espertech.esper.epl.named
Class NamedWindowIndexRepository

java.lang.Object
  extended by com.espertech.esper.epl.named.NamedWindowIndexRepository

public class NamedWindowIndexRepository
extends java.lang.Object

A repository of index tables for use with a single named window and all it's deleting statements that may use the indexes to correlate triggering events with indexed events of the named window.

Maintains index tables and keeps a reference count for user. Allows reuse of indexes for multiple deleting statements.


Constructor Summary
NamedWindowIndexRepository()
          Ctor.
 
Method Summary
 Pair<IndexMultiKey,EventTableAndNamePair> addExplicitIndexOrReuse(boolean unique, java.util.List<IndexedPropDesc> hashProps, java.util.List<IndexedPropDesc> btreeProps, java.lang.Iterable<EventBean> prefilledEvents, EventType indexedType, java.lang.String indexName)
           
 Pair<IndexMultiKey,EventTableAndNamePair> addTableCreateOrReuse(java.util.List<IndexedPropDesc> hashProps, java.util.List<IndexedPropDesc> btreeProps, java.lang.Iterable<EventBean> prefilledEvents, EventType indexedType, IndexHint optionalIndexHint, boolean isIndexShare, int subqueryNumber, java.util.Set<java.lang.String> optionalUniqueKeyProps)
           
 void addTableReference(EventTable table)
           
 void destroy()
          Destroy indexes.
 Pair<IndexMultiKey,EventTableAndNamePair> findTable(java.util.Set<java.lang.String> keyPropertyNames, java.util.Set<java.lang.String> rangePropertyNames, java.util.Map<java.lang.String,EventTable> explicitIndexNames, IndexHint optionalIndexHint)
           
 IndexMultiKey[] getIndexDescriptors()
           
 java.util.List<EventTable> getTables()
          Returns a list of current index tables in the repository.
 void removeTableReference(EventTable table)
          Remove a reference to an index table, decreasing its reference count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedWindowIndexRepository

public NamedWindowIndexRepository()
Ctor.

Method Detail

addExplicitIndexOrReuse

public Pair<IndexMultiKey,EventTableAndNamePair> addExplicitIndexOrReuse(boolean unique,
                                                                         java.util.List<IndexedPropDesc> hashProps,
                                                                         java.util.List<IndexedPropDesc> btreeProps,
                                                                         java.lang.Iterable<EventBean> prefilledEvents,
                                                                         EventType indexedType,
                                                                         java.lang.String indexName)

addTableCreateOrReuse

public Pair<IndexMultiKey,EventTableAndNamePair> addTableCreateOrReuse(java.util.List<IndexedPropDesc> hashProps,
                                                                       java.util.List<IndexedPropDesc> btreeProps,
                                                                       java.lang.Iterable<EventBean> prefilledEvents,
                                                                       EventType indexedType,
                                                                       IndexHint optionalIndexHint,
                                                                       boolean isIndexShare,
                                                                       int subqueryNumber,
                                                                       java.util.Set<java.lang.String> optionalUniqueKeyProps)

addTableReference

public void addTableReference(EventTable table)

removeTableReference

public void removeTableReference(EventTable table)
Remove a reference to an index table, decreasing its reference count. If the table is no longer used, discard it and no longer update events into the index.

Parameters:
table - to remove a reference to

getTables

public java.util.List<EventTable> getTables()
Returns a list of current index tables in the repository.

Returns:
index tables

destroy

public void destroy()
Destroy indexes.


findTable

public Pair<IndexMultiKey,EventTableAndNamePair> findTable(java.util.Set<java.lang.String> keyPropertyNames,
                                                           java.util.Set<java.lang.String> rangePropertyNames,
                                                           java.util.Map<java.lang.String,EventTable> explicitIndexNames,
                                                           IndexHint optionalIndexHint)

getIndexDescriptors

public IndexMultiKey[] getIndexDescriptors()

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