net.esper.eql.named
Class NamedWindowIndexRepository

java.lang.Object
  extended by net.esper.eql.named.NamedWindowIndexRepository

public class NamedWindowIndexRepository
extends 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
 PropertyIndexedEventTable addTable(JoinedPropDesc[] joinedPropDesc, Iterable<EventBean> prefilledEvents, EventType indexedType, boolean mustCoerce)
          Create a new index table or use an existing index table, by matching the join descriptor properties to an existing table.
 void destroy()
          Destroy indexes.
 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

addTable

public PropertyIndexedEventTable addTable(JoinedPropDesc[] joinedPropDesc,
                                          Iterable<EventBean> prefilledEvents,
                                          EventType indexedType,
                                          boolean mustCoerce)
Create a new index table or use an existing index table, by matching the join descriptor properties to an existing table.

Parameters:
joinedPropDesc - must be in sorted natural order and define the properties joined
prefilledEvents - is the events to enter into a new table, if a new table is created
indexedType - is the type of event to hold in the index
mustCoerce - is an indicator whether coercion is required or not.
Returns:
new or existing index 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 List<EventTable> getTables()
Returns a list of current index tables in the repository.

Returns:
index tables

destroy

public void destroy()
Destroy indexes.


© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com