com.espertech.esper.epl.view
Class OutputProcessView

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

public abstract class OutputProcessView
extends Object
implements View, JoinSetIndicator

Base output processing view that has the responsibility to serve up event type and statement iterator.

Implementation classes may enforce an output rate stabilizing or limiting policy.


Field Summary
protected  UpdateDispatchView childView
          The view to ultimately dispatch to.
protected  boolean isGenerateSynthetic
          An indicator on whether we always need synthetic events such as for insert-into.
protected  OutputStrategy outputStrategy
          Strategy to performs the output once it's decided we need to output.
protected  Viewable parentView
          The parent view for iteration.
protected  ResultSetProcessor resultSetProcessor
          Processes the parent views result set generating events for pushing out to child view.
protected  StatementResultService statementResultService
          Manages listeners/subscribers to a statement, informing about current result generation needs.
 
Constructor Summary
protected OutputProcessView(ResultSetProcessor resultSetProcessor, OutputStrategy outputStrategy, boolean isInsertInto, StatementResultService statementResultService)
          Ctor.
 
Method Summary
 View addView(View view)
          Add a view to the viewable object.
 EventType getEventType()
          Provides metadata information about the type of object the event collection contains.
 Viewable getParent()
          Returns the View's parent Viewable.
 List<View> getViews()
          Returns all added views.
 boolean hasViews()
          Test is there are any views to the Viewable.
 Iterator<EventBean> iterator()
          Allows iteration through all elements in this event collection.
 boolean removeView(View view)
          Remove a view.
 void setJoinExecutionStrategy(JoinExecutionStrategy joinExecutionStrategy)
          For joins, supplies the join execution strategy that provides iteration over statement results.
 void setParent(Viewable parent)
          Called when the View is added to a Viewable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.view.View
update
 
Methods inherited from interface com.espertech.esper.epl.join.JoinSetProcessor
process
 

Field Detail

resultSetProcessor

protected final ResultSetProcessor resultSetProcessor
Processes the parent views result set generating events for pushing out to child view.


outputStrategy

protected final OutputStrategy outputStrategy
Strategy to performs the output once it's decided we need to output.


statementResultService

protected final StatementResultService statementResultService
Manages listeners/subscribers to a statement, informing about current result generation needs.


childView

protected UpdateDispatchView childView
The view to ultimately dispatch to.


parentView

protected Viewable parentView
The parent view for iteration.


isGenerateSynthetic

protected boolean isGenerateSynthetic
An indicator on whether we always need synthetic events such as for insert-into.

Constructor Detail

OutputProcessView

protected OutputProcessView(ResultSetProcessor resultSetProcessor,
                            OutputStrategy outputStrategy,
                            boolean isInsertInto,
                            StatementResultService statementResultService)
Ctor.

Parameters:
resultSetProcessor - processes the results posted by parent view or joins
outputStrategy - the strategy to use for producing output
isInsertInto - true if this is an insert-into
statementResultService - for awareness of listeners and subscriber
Method Detail

getParent

public Viewable getParent()
Description copied from interface: View
Returns the View's parent Viewable.

Specified by:
getParent in interface View
Returns:
viewable

setParent

public void setParent(Viewable parent)
Description copied from interface: View
Called when the View is added to a Viewable object.

Specified by:
setParent in interface View
Parameters:
parent - is the parent that this view is a child of

addView

public View addView(View view)
Description copied from interface: Viewable
Add a view to the viewable object.

Specified by:
addView in interface Viewable
Parameters:
view - to add
Returns:
view to add

getViews

public List<View> getViews()
Description copied from interface: Viewable
Returns all added views.

Specified by:
getViews in interface Viewable
Returns:
list of added views

removeView

public boolean removeView(View view)
Description copied from interface: Viewable
Remove a view.

Specified by:
removeView in interface Viewable
Parameters:
view - to remove
Returns:
true to indicate that the view to be removed existed within this view, false if the view to remove could not be found

hasViews

public boolean hasViews()
Description copied from interface: Viewable
Test is there are any views to the Viewable.

Specified by:
hasViews in interface Viewable
Returns:
true indicating there are child views, false indicating there are no child views

getEventType

public EventType getEventType()
Description copied from interface: EventCollection
Provides metadata information about the type of object the event collection contains.

Specified by:
getEventType in interface EventCollection
Returns:
metadata for the objects in the collection

setJoinExecutionStrategy

public void setJoinExecutionStrategy(JoinExecutionStrategy joinExecutionStrategy)
For joins, supplies the join execution strategy that provides iteration over statement results.

Parameters:
joinExecutionStrategy - executes joins including static (non-continuous) joins

iterator

public Iterator<EventBean> iterator()
Description copied from interface: EventCollection
Allows iteration through all elements in this event collection. The iterator will return the elements in the collection in their natural order, or, if there is no natural ordering, in some unpredictable order.

Specified by:
iterator in interface EventCollection
Specified by:
iterator in interface Iterable<EventBean>
Returns:
an iterator which will go through all current elements in the collection.

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