com.espertech.esper.epl.lookup
Class EventTableIndexRepository

java.lang.Object
  extended by com.espertech.esper.epl.lookup.EventTableIndexRepository

public class EventTableIndexRepository
extends java.lang.Object

A repository of index tables for use with anything that may use the indexes to correlate triggering events with indexed events.

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


Constructor Summary
EventTableIndexRepository()
          Ctor.
 
Method Summary
 void addExplicitIndex(java.lang.String indexName, EventTableCreateIndexDesc desc, EventType eventType, java.lang.Iterable<EventBean> dataWindowContents, AgentInstanceContext agentInstanceContext, java.lang.Object optionalSerde)
           
 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, AgentInstanceContext agentInstanceContext, java.lang.Object optionalSerde)
           
 void addIndex(IndexMultiKey indexMultiKey, EventTableIndexRepositoryEntry entry)
           
 void destroy()
          Destroy indexes.
 Pair<IndexMultiKey,EventTableAndNamePair> findTable(java.util.Set<java.lang.String> keyPropertyNames, java.util.Set<java.lang.String> rangePropertyNames, java.util.List<IndexHintInstruction> optionalIndexHintInstructions)
           
 EventTable getExplicitIndexByName(java.lang.String indexName)
           
 java.lang.String[] getExplicitIndexNames()
           
 EventTable getIndexByDesc(IndexMultiKey indexKey)
           
 IndexMultiKey getIndexByName(java.lang.String indexName)
           
 IndexMultiKey[] getIndexDescriptors()
           
 java.util.List<EventTable> getTables()
          Returns a list of current index tables in the repository.
 void removeExplicitIndex(java.lang.String indexName)
           
 void removeIndex(IndexMultiKey index)
           
 void validateAddExplicitIndex(boolean unique, java.lang.String indexName, java.util.List<CreateIndexItem> columns, EventType eventType, java.lang.Iterable<EventBean> dataWindowContents, AgentInstanceContext agentInstanceContext, boolean allowIndexExists, java.lang.Object optionalSerde)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventTableIndexRepository

public EventTableIndexRepository()
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,
                                                                         AgentInstanceContext agentInstanceContext,
                                                                         java.lang.Object optionalSerde)

addIndex

public void addIndex(IndexMultiKey indexMultiKey,
                     EventTableIndexRepositoryEntry entry)

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.List<IndexHintInstruction> optionalIndexHintInstructions)

getIndexDescriptors

public IndexMultiKey[] getIndexDescriptors()

validateAddExplicitIndex

public void validateAddExplicitIndex(boolean unique,
                                     java.lang.String indexName,
                                     java.util.List<CreateIndexItem> columns,
                                     EventType eventType,
                                     java.lang.Iterable<EventBean> dataWindowContents,
                                     AgentInstanceContext agentInstanceContext,
                                     boolean allowIndexExists,
                                     java.lang.Object optionalSerde)
                              throws ExprValidationException
Throws:
ExprValidationException

addExplicitIndex

public void addExplicitIndex(java.lang.String indexName,
                             EventTableCreateIndexDesc desc,
                             EventType eventType,
                             java.lang.Iterable<EventBean> dataWindowContents,
                             AgentInstanceContext agentInstanceContext,
                             java.lang.Object optionalSerde)

getExplicitIndexByName

public EventTable getExplicitIndexByName(java.lang.String indexName)

getIndexByDesc

public EventTable getIndexByDesc(IndexMultiKey indexKey)

getExplicitIndexNames

public java.lang.String[] getExplicitIndexNames()

removeIndex

public void removeIndex(IndexMultiKey index)

getIndexByName

public IndexMultiKey getIndexByName(java.lang.String indexName)

removeExplicitIndex

public void removeExplicitIndex(java.lang.String indexName)

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