com.espertech.esper.epl.view
Class OutputProcessViewPolicy

java.lang.Object
  extended by com.espertech.esper.epl.view.OutputProcessView
      extended by com.espertech.esper.epl.view.OutputProcessViewPolicy
All Implemented Interfaces:
JoinSetIndicator, JoinSetProcessor, EventCollection, View, Viewable, Iterable<EventBean>

public class OutputProcessViewPolicy
extends OutputProcessView

A view that prepares output events, batching incoming events and invoking the result set processor as necessary.

Handles output rate limiting or stabilizing.


Field Summary
 
Fields inherited from class com.espertech.esper.epl.view.OutputProcessView
childView, isGenerateSynthetic, outputStrategy, parentView, resultSetProcessor, statementResultService
 
Constructor Summary
OutputProcessViewPolicy(ResultSetProcessor resultSetProcessor, OutputStrategy outputStrategy, boolean isInsertInto, int streamCount, OutputLimitSpec outputLimitSpec, StatementContext statementContext)
          Ctor.
 
Method Summary
protected  void continueOutputProcessingJoin(boolean doOutput, boolean forceUpdate)
          Called once the output condition has been met.
protected  void continueOutputProcessingView(boolean doOutput, boolean forceUpdate)
          Called once the output condition has been met.
 void process(Set<MultiKey<EventBean>> newEvents, Set<MultiKey<EventBean>> oldEvents)
          This process (update) method is for participation in a join.
 void update(EventBean[] newData, EventBean[] oldData)
          The update method is called if the view does not participate in a join.
 
Methods inherited from class com.espertech.esper.epl.view.OutputProcessView
addView, getEventType, getParent, getViews, hasViews, iterator, removeView, setJoinExecutionStrategy, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputProcessViewPolicy

public OutputProcessViewPolicy(ResultSetProcessor resultSetProcessor,
                               OutputStrategy outputStrategy,
                               boolean isInsertInto,
                               int streamCount,
                               OutputLimitSpec outputLimitSpec,
                               StatementContext statementContext)
Ctor.

Parameters:
resultSetProcessor - is processing the result set for publishing it out
streamCount - is the number of streams, indicates whether or not this view participates in a join
outputLimitSpec - is the specification for limiting output (the output condition and the result set processor)
statementContext - is the services the output condition may depend on
isInsertInto - is true if the statement is a insert-into
outputStrategy - is the method to use to produce output
Method Detail

update

public void update(EventBean[] newData,
                   EventBean[] oldData)
The update method is called if the view does not participate in a join.

Parameters:
newData - - new events
oldData - - old events

process

public void process(Set<MultiKey<EventBean>> newEvents,
                    Set<MultiKey<EventBean>> oldEvents)
This process (update) method is for participation in a join.

Parameters:
newEvents - - new events
oldEvents - - old events

continueOutputProcessingView

protected void continueOutputProcessingView(boolean doOutput,
                                            boolean forceUpdate)
Called once the output condition has been met. Invokes the result set processor. Used for non-join event data.

Parameters:
doOutput - - true if the batched events should actually be output as well as processed, false if they should just be processed
forceUpdate - - true if output should be made even when no updating events have arrived

continueOutputProcessingJoin

protected void continueOutputProcessingJoin(boolean doOutput,
                                            boolean forceUpdate)
Called once the output condition has been met. Invokes the result set processor. Used for join event data.

Parameters:
doOutput - - true if the batched events should actually be output as well as processed, false if they should just be processed
forceUpdate - - true if output should be made even when no updating events have arrived

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