com.espertech.esper.epl.join.base
Class JoinSetComposerHistoricalImpl

java.lang.Object
  extended by com.espertech.esper.epl.join.base.JoinSetComposerHistoricalImpl
All Implemented Interfaces:
JoinSetComposer

public class JoinSetComposerHistoricalImpl
extends java.lang.Object
implements JoinSetComposer

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


Constructor Summary
JoinSetComposerHistoricalImpl(java.util.Map<TableLookupIndexReqKey,EventTable>[] repositories, QueryStrategy[] queryStrategies, Viewable[] streamViews, ExprEvaluatorContext staticEvalExprEvaluatorContext)
          Ctor.
 
Method Summary
 void destroy()
          Destroy stateful index tables, if any.
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<java.util.Set<MultiKey<EventBean>>> join(EventBean[][] newDataPerStream, EventBean[][] oldDataPerStream, ExprEvaluatorContext exprEvaluatorContext)
          Return join tuple result set from new data and old data for each stream.
 java.util.Set<MultiKey<EventBean>> staticJoin()
          For use in iteration over join statements, this must build a join tuple result set from all events in indexes, executing query strategies for each.
 void visitIndexes(StatementAgentInstancePostLoadIndexVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinSetComposerHistoricalImpl

public JoinSetComposerHistoricalImpl(java.util.Map<TableLookupIndexReqKey,EventTable>[] repositories,
                                     QueryStrategy[] queryStrategies,
                                     Viewable[] streamViews,
                                     ExprEvaluatorContext staticEvalExprEvaluatorContext)
Ctor.

Parameters:
repositories - indexes for non-historical streams
queryStrategies - for each stream a strategy to execute the join
streamViews - the viewable representing each stream
staticEvalExprEvaluatorContext - expression evaluation context for static (not runtime) evaluation
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

destroy

public void destroy()
Description copied from interface: JoinSetComposer
Destroy stateful index tables, if any.

Specified by:
destroy in interface JoinSetComposer

join

public UniformPair<java.util.Set<MultiKey<EventBean>>> join(EventBean[][] newDataPerStream,
                                                            EventBean[][] oldDataPerStream,
                                                            ExprEvaluatorContext exprEvaluatorContext)
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).
exprEvaluatorContext - expression evaluation context
Returns:
join tuples

getTables

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

Returns:
tables for stream.

getQueryStrategies

protected QueryStrategy[] getQueryStrategies()
Returns query strategies.

Returns:
query strategies

staticJoin

public java.util.Set<MultiKey<EventBean>> staticJoin()
Description copied from interface: JoinSetComposer
For use in iteration over join statements, this must build a join tuple result set from all events in indexes, executing query strategies for each.

Specified by:
staticJoin in interface JoinSetComposer
Returns:
static join result

visitIndexes

public void visitIndexes(StatementAgentInstancePostLoadIndexVisitor visitor)
Specified by:
visitIndexes in interface JoinSetComposer

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