com.espertech.esper.epl.join.exec.base
Class LookupInstructionExec

java.lang.Object
  extended by com.espertech.esper.epl.join.exec.base.LookupInstructionExec

public class LookupInstructionExec
extends java.lang.Object

Execution for a lookup instruction to look up in one or more event streams with a supplied event and using a given set of lookup strategies, and adding any lookup results to a lighweight repository object for later result assembly.


Constructor Summary
LookupInstructionExec(int fromStream, java.lang.String fromStreamName, int[] toStreams, JoinExecTableLookupStrategy[] lookupStrategies, boolean[] requiredPerStream)
          Ctor.
 
Method Summary
 int getFromStream()
          Returns the stream number of the stream supplying the event to use for lookup.
 boolean hasRequiredStream()
          Returns true if there is one or more required substreams or false if no substreams are required joins.
 void print(IndentWriter writer)
          Output the instruction.
 boolean process(Repository repository, ExprEvaluatorContext exprEvaluatorContext)
          Execute the instruction adding results to the repository and obtaining events for lookup from the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupInstructionExec

public LookupInstructionExec(int fromStream,
                             java.lang.String fromStreamName,
                             int[] toStreams,
                             JoinExecTableLookupStrategy[] lookupStrategies,
                             boolean[] requiredPerStream)
Ctor.

Parameters:
fromStream - - the stream supplying the lookup event
fromStreamName - - the stream name supplying the lookup event
toStreams - - the set of streams to look up in
lookupStrategies - - the strategy to use for each stream to look up in
requiredPerStream - - indicates which of the lookup streams are required to build a result and which are not
Method Detail

getFromStream

public int getFromStream()
Returns the stream number of the stream supplying the event to use for lookup.

Returns:
stream number

hasRequiredStream

public boolean hasRequiredStream()
Returns true if there is one or more required substreams or false if no substreams are required joins.

Returns:
true if any substreams are required (inner) joins, or false if not

process

public boolean process(Repository repository,
                       ExprEvaluatorContext exprEvaluatorContext)
Execute the instruction adding results to the repository and obtaining events for lookup from the repository.

Parameters:
repository - supplies events for lookup, and place to add results to
exprEvaluatorContext - expression evaluation context
Returns:
true if one or more results, false if no results

print

public void print(IndentWriter writer)
Output the instruction.

Parameters:
writer - is the write to output to

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