com.espertech.esper.epl.named
Class NamedWindowProcessor

java.lang.Object
  extended by com.espertech.esper.epl.named.NamedWindowProcessor

public class NamedWindowProcessor
extends Object

An instance of this class is associated with a specific named window. The processor provides the views to create-window, on-delete statements and statements selecting from a named window.


Constructor Summary
NamedWindowProcessor(NamedWindowService namedWindowService, String windowName, EventType eventType, EPStatementHandle createWindowStmtHandle, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor)
          Ctor.
 
Method Summary
 NamedWindowConsumerView addConsumer(List<ExprNode> filterList, EPStatementHandle statementHandle, StatementStopService statementStopService)
          Adds a consuming (selecting) statement to the named window.
 NamedWindowOnExprBaseView addOnExpr(OnTriggerDesc onTriggerDesc, ExprNode joinExpr, EventType filterEventType, StatementStopService statementStopService, InternalEventRouter internalEventRouter, ResultSetProcessor resultSetProcessor, EPStatementHandle statementHandle, StatementResultService statementResultService)
          Returns a new view for a new on-delete or on-select statement.
 void destroy()
          Deletes a named window and removes any associated resources.
 EventType getNamedWindowType()
          Returns the event type of the named window.
 NamedWindowRootView getRootView()
          Returns the root view of the named window, hooked into the view chain before the named window's data window views, right after the filter stream that filters for insert-into events.
 NamedWindowTailView getTailView()
          Returns the tail view of the named window, hooked into the view chain after the named window's data window views, as the last view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedWindowProcessor

public NamedWindowProcessor(NamedWindowService namedWindowService,
                            String windowName,
                            EventType eventType,
                            EPStatementHandle createWindowStmtHandle,
                            StatementResultService statementResultService,
                            ValueAddEventProcessor revisionProcessor)
Ctor.

Parameters:
namedWindowService - service for dispatching results
windowName - the window name
eventType - the type of event held by the named window
createWindowStmtHandle - the statement handle of the statement that created the named window
statementResultService - for coordinating on whether insert and remove stream events should be posted
revisionProcessor - for revision processing
Method Detail

getTailView

public NamedWindowTailView getTailView()
Returns the tail view of the named window, hooked into the view chain after the named window's data window views, as the last view.

Returns:
tail view

getRootView

public NamedWindowRootView getRootView()
Returns the root view of the named window, hooked into the view chain before the named window's data window views, right after the filter stream that filters for insert-into events.

Returns:
tail view

addOnExpr

public NamedWindowOnExprBaseView addOnExpr(OnTriggerDesc onTriggerDesc,
                                           ExprNode joinExpr,
                                           EventType filterEventType,
                                           StatementStopService statementStopService,
                                           InternalEventRouter internalEventRouter,
                                           ResultSetProcessor resultSetProcessor,
                                           EPStatementHandle statementHandle,
                                           StatementResultService statementResultService)
Returns a new view for a new on-delete or on-select statement.

Parameters:
onTriggerDesc - descriptor describing the on-trigger specification
filterEventType - event type to trigger on
statementStopService - to indicate a on-delete was stopped
internalEventRouter - for insert-into handling
resultSetProcessor - for select-clause processing
statementHandle - is the handle to the statement, used for routing/insert-into
joinExpr - is the join expression or null if there is none
statementResultService - for coordinating on whether insert and remove stream events should be posted
Returns:
on trigger handling view

getNamedWindowType

public EventType getNamedWindowType()
Returns the event type of the named window.

Returns:
event type

addConsumer

public NamedWindowConsumerView addConsumer(List<ExprNode> filterList,
                                           EPStatementHandle statementHandle,
                                           StatementStopService statementStopService)
Adds a consuming (selecting) statement to the named window.

Parameters:
statementHandle - is the statement's handle for locking
statementStopService - for indicating the consuming statement is stopped or destroyed
filterList - is a list of filter expressions
Returns:
consumer view

destroy

public void destroy()
Deletes a named window and removes any associated resources.


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