com.espertech.esper.epl.core
Class ResultSetProcessorHandThrough

java.lang.Object
  extended by com.espertech.esper.epl.core.ResultSetProcessorBaseSimple
      extended by com.espertech.esper.epl.core.ResultSetProcessorHandThrough
All Implemented Interfaces:
ResultSetProcessor

public class ResultSetProcessorHandThrough
extends ResultSetProcessorBaseSimple

Result set processor for the hand-through case: no aggregation functions used in the select clause, and no group-by, no having and ordering.


Constructor Summary
ResultSetProcessorHandThrough(ResultSetProcessorHandThroughFactory prototype, SelectExprProcessor selectExprProcessor, AgentInstanceContext agentInstanceContext)
           
 
Method Summary
 void applyJoinResult(java.util.Set<MultiKey<EventBean>> newEvents, java.util.Set<MultiKey<EventBean>> oldEvents)
           
 void applyViewResult(EventBean[] newData, EventBean[] oldData)
           
 void clear()
          Clear out current state.
 UniformPair<EventBean[]> continueOutputLimitedLastAllNonBufferedJoin(boolean isSynthesize, boolean isAll)
           
 UniformPair<EventBean[]> continueOutputLimitedLastAllNonBufferedView(boolean isSynthesize, boolean isAll)
           
 java.util.Iterator<EventBean> getIterator(java.util.Set<MultiKey<EventBean>> joinSet)
          Returns the iterator for iterating over a join-result.
 java.util.Iterator<EventBean> getIterator(Viewable parent)
          Returns the iterator implementing the group-by and aggregation and order-by logic specific to each case of use of these construct.
 EventType getResultEventType()
          Returns the event type of processed results.
protected static EventBean[] getSelectEventsNoHaving(SelectExprProcessor exprProcessor, EventBean[] events, boolean isNewData, boolean isSynthesize, ExprEvaluatorContext agentInstanceContext)
          Applies the select-clause to the given events returning the selected events.
protected static EventBean[] getSelectEventsNoHaving(SelectExprProcessor exprProcessor, java.util.Set<MultiKey<EventBean>> events, boolean isNewData, boolean isSynthesize, ExprEvaluatorContext agentInstanceContext)
          Applies the select-clause to the given events returning the selected events.
 boolean hasAggregation()
           
 UniformPair<EventBean[]> processJoinResult(java.util.Set<MultiKey<EventBean>> newEvents, java.util.Set<MultiKey<EventBean>> oldEvents, boolean isSynthesize)
          For use by joins posting their result, process the event rows that are entered and removed (new and old events).
 void processOutputLimitedLastAllNonBufferedJoin(java.util.Set<MultiKey<EventBean>> newEvents, java.util.Set<MultiKey<EventBean>> oldEvents, boolean isGenerateSynthetic, boolean isAll)
           
 void processOutputLimitedLastAllNonBufferedView(EventBean[] newData, EventBean[] oldData, boolean isGenerateSynthetic, boolean isAll)
           
 UniformPair<EventBean[]> processViewResult(EventBean[] newData, EventBean[] oldData, boolean isSynthesize)
          For use by views posting their result, process the event rows that are entered and removed (new and old events).
 void setAgentInstanceContext(AgentInstanceContext agentInstanceContext)
           
 
Methods inherited from class com.espertech.esper.epl.core.ResultSetProcessorBaseSimple
processOutputLimitedJoin, processOutputLimitedView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetProcessorHandThrough

public ResultSetProcessorHandThrough(ResultSetProcessorHandThroughFactory prototype,
                                     SelectExprProcessor selectExprProcessor,
                                     AgentInstanceContext agentInstanceContext)
Method Detail

setAgentInstanceContext

public void setAgentInstanceContext(AgentInstanceContext agentInstanceContext)

getResultEventType

public EventType getResultEventType()
Description copied from interface: ResultSetProcessor
Returns the event type of processed results.

Returns:
event type of the resulting events posted by the processor.

processJoinResult

public UniformPair<EventBean[]> processJoinResult(java.util.Set<MultiKey<EventBean>> newEvents,
                                                  java.util.Set<MultiKey<EventBean>> oldEvents,
                                                  boolean isSynthesize)
Description copied from interface: ResultSetProcessor
For use by joins posting their result, process the event rows that are entered and removed (new and old events). Processes according to select-clauses, group-by clauses and having-clauses and returns new events and old events as specified.

Parameters:
newEvents - - new events posted by join
oldEvents - - old events posted by join
isSynthesize - - set to true to indicate that synthetic events are required for an iterator result set
Returns:
pair of new events and old events

processViewResult

public UniformPair<EventBean[]> processViewResult(EventBean[] newData,
                                                  EventBean[] oldData,
                                                  boolean isSynthesize)
Description copied from interface: ResultSetProcessor
For use by views posting their result, process the event rows that are entered and removed (new and old events). Processes according to select-clauses, group-by clauses and having-clauses and returns new events and old events as specified.

Parameters:
newData - - new events posted by view
oldData - - old events posted by view
isSynthesize - - set to true to indicate that synthetic events are required for an iterator result set
Returns:
pair of new events and old events

getSelectEventsNoHaving

protected static EventBean[] getSelectEventsNoHaving(SelectExprProcessor exprProcessor,
                                                     EventBean[] events,
                                                     boolean isNewData,
                                                     boolean isSynthesize,
                                                     ExprEvaluatorContext agentInstanceContext)
Applies the select-clause to the given events returning the selected events. The number of events stays the same, i.e. this method does not filter it just transforms the result set.

Parameters:
exprProcessor - - processes each input event and returns output event
events - - input events
isNewData - - indicates whether we are dealing with new data (istream) or old data (rstream)
isSynthesize - - set to true to indicate that synthetic events are required for an iterator result set
Returns:
output events, one for each input event

getSelectEventsNoHaving

protected static EventBean[] getSelectEventsNoHaving(SelectExprProcessor exprProcessor,
                                                     java.util.Set<MultiKey<EventBean>> events,
                                                     boolean isNewData,
                                                     boolean isSynthesize,
                                                     ExprEvaluatorContext agentInstanceContext)
Applies the select-clause to the given events returning the selected events. The number of events stays the same, i.e. this method does not filter it just transforms the result set.

Parameters:
exprProcessor - - processes each input event and returns output event
events - - input events
isNewData - - indicates whether we are dealing with new data (istream) or old data (rstream)
isSynthesize - - set to true to indicate that synthetic events are required for an iterator result set
Returns:
output events, one for each input event

clear

public void clear()
Description copied from interface: ResultSetProcessor
Clear out current state.

Specified by:
clear in interface ResultSetProcessor
Overrides:
clear in class ResultSetProcessorBaseSimple

getIterator

public java.util.Iterator<EventBean> getIterator(Viewable parent)
Description copied from interface: ResultSetProcessor
Returns the iterator implementing the group-by and aggregation and order-by logic specific to each case of use of these construct.

Parameters:
parent - is the parent view iterator
Returns:
event iterator

getIterator

public java.util.Iterator<EventBean> getIterator(java.util.Set<MultiKey<EventBean>> joinSet)
Description copied from interface: ResultSetProcessor
Returns the iterator for iterating over a join-result.

Parameters:
joinSet - is the join result set
Returns:
iterator over join results

hasAggregation

public boolean hasAggregation()

applyViewResult

public void applyViewResult(EventBean[] newData,
                            EventBean[] oldData)

applyJoinResult

public void applyJoinResult(java.util.Set<MultiKey<EventBean>> newEvents,
                            java.util.Set<MultiKey<EventBean>> oldEvents)

processOutputLimitedLastAllNonBufferedView

public void processOutputLimitedLastAllNonBufferedView(EventBean[] newData,
                                                       EventBean[] oldData,
                                                       boolean isGenerateSynthetic,
                                                       boolean isAll)

processOutputLimitedLastAllNonBufferedJoin

public void processOutputLimitedLastAllNonBufferedJoin(java.util.Set<MultiKey<EventBean>> newEvents,
                                                       java.util.Set<MultiKey<EventBean>> oldEvents,
                                                       boolean isGenerateSynthetic,
                                                       boolean isAll)

continueOutputLimitedLastAllNonBufferedView

public UniformPair<EventBean[]> continueOutputLimitedLastAllNonBufferedView(boolean isSynthesize,
                                                                            boolean isAll)

continueOutputLimitedLastAllNonBufferedJoin

public UniformPair<EventBean[]> continueOutputLimitedLastAllNonBufferedJoin(boolean isSynthesize,
                                                                            boolean isAll)

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