net.esper.eql.join
Class JoinSetComposerImpl

java.lang.Object
  extended by net.esper.eql.join.JoinSetComposerImpl
All Implemented Interfaces:
JoinSetComposer

public class JoinSetComposerImpl
extends Object
implements JoinSetComposer

Implements the function to determine a join result set using tables/indexes and query strategy instances for each stream.


Constructor Summary
JoinSetComposerImpl(EventTable[][] repositories, QueryStrategy[] queryStrategies, SelectClauseStreamSelectorEnum selectStreamSelectorEnum)
          Ctor.
 
Method Summary
protected  QueryStrategy[] getQueryStrategies()
          Returns query strategies.
protected  EventTable[][] getTables()
          Returns tables.
 void init(EventBean[][] eventsPerStream)
          Provides initialization events per stream to composer to populate join indexes, if required
 UniformPair<Set<MultiKey<EventBean>>> join(EventBean[][] newDataPerStream, EventBean[][] oldDataPerStream)
          Return join tuple result set from new data and old data for each stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinSetComposerImpl

public JoinSetComposerImpl(EventTable[][] repositories,
                           QueryStrategy[] queryStrategies,
                           SelectClauseStreamSelectorEnum selectStreamSelectorEnum)
Ctor.

Parameters:
repositories - - for each stream an array of (indexed/unindexed) tables for lookup.
queryStrategies - - for each stream a strategy to execute the join
selectStreamSelectorEnum - - indicator for rstream or istream-only, for optimization
Method Detail

init

public void init(EventBean[][] eventsPerStream)
Description copied from interface: JoinSetComposer
Provides initialization events per stream to composer to populate join indexes, if required

Specified by:
init in interface JoinSetComposer
Parameters:
eventsPerStream - is an array of events for each stream, with null elements to indicate no events for a stream

join

public UniformPair<Set<MultiKey<EventBean>>> join(EventBean[][] newDataPerStream,
                                                  EventBean[][] oldDataPerStream)
Description copied from interface: JoinSetComposer
Return join tuple result set from new data and old data for each stream.

Specified by:
join in interface JoinSetComposer
Parameters:
newDataPerStream - - for each stream the event array (can be null).
oldDataPerStream - - for each stream the event array (can be null).
Returns:
join tuples

getTables

protected EventTable[][] getTables()
Returns tables.

Returns:
tables for stream.

getQueryStrategies

protected QueryStrategy[] getQueryStrategies()
Returns query strategies.

Returns:
query strategies