com.espertech.esper.epl.named
Class NamedWindowDispatchServiceImpl

java.lang.Object
  extended by com.espertech.esper.epl.named.NamedWindowDispatchServiceImpl
All Implemented Interfaces:
NamedWindowDispatchService

public class NamedWindowDispatchServiceImpl
extends java.lang.Object
implements NamedWindowDispatchService

This service hold for each named window a dedicated processor and a lock to the named window. This lock is shrared between the named window and on-delete statements.


Constructor Summary
NamedWindowDispatchServiceImpl(SchedulingService schedulingService, VariableService variableService, TableService tableService, boolean isPrioritized, ManagedReadWriteLock eventProcessingRWLock, ExceptionHandlingService exceptionHandlingService, MetricReportingService metricReportingService)
          Ctor.
 
Method Summary
 void addDispatch(NamedWindowConsumerLatchFactory latchFactory, NamedWindowDeltaData delta, java.util.Map<EPStatementAgentInstanceHandle,java.util.List<NamedWindowConsumerView>> consumers)
          For use to add a result of a named window that must be dispatched to consuming views.
 NamedWindowProcessor createProcessor(java.lang.String name, NamedWindowMgmtServiceImpl namedWindowMgmtService, NamedWindowDispatchService namedWindowDispatchService, java.lang.String contextName, EventType eventType, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor, java.lang.String eplExpression, java.lang.String statementName, boolean isPrioritized, boolean isEnableSubqueryIndexShare, boolean enableQueryPlanLog, MetricReportingService metricReportingService, boolean isBatchingDataWindow, boolean isVirtualDataWindow, java.util.Set<java.lang.String> optionalUniqueKeyProps, java.lang.String eventTypeAsName, StatementContext statementContextCreateWindow)
           
 NamedWindowTailView createTailView(EventType eventType, NamedWindowMgmtService namedWindowMgmtService, NamedWindowDispatchService namedWindowDispatchService, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor, boolean prioritized, boolean parentBatchWindow, java.lang.String contextName, TimeSourceService timeSourceService, ConfigurationEngineDefaults.Threading threadingConfig)
           
 void destroy()
          Destroy service.
 boolean dispatch()
          Dispatch events of the insert and remove stream of named windows to consumers, as part of the main event processing or dispatch loop.
 java.util.LinkedHashMap<NamedWindowConsumerView,NamedWindowDeltaData> getDeltaPerConsumer(java.lang.Object perStmtObj, EPStatementAgentInstanceHandle handle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedWindowDispatchServiceImpl

public NamedWindowDispatchServiceImpl(SchedulingService schedulingService,
                                      VariableService variableService,
                                      TableService tableService,
                                      boolean isPrioritized,
                                      ManagedReadWriteLock eventProcessingRWLock,
                                      ExceptionHandlingService exceptionHandlingService,
                                      MetricReportingService metricReportingService)
Ctor.

Parameters:
variableService - is for variable access
isPrioritized - if the engine is running with prioritized execution
Method Detail

createProcessor

public NamedWindowProcessor createProcessor(java.lang.String name,
                                            NamedWindowMgmtServiceImpl namedWindowMgmtService,
                                            NamedWindowDispatchService namedWindowDispatchService,
                                            java.lang.String contextName,
                                            EventType eventType,
                                            StatementResultService statementResultService,
                                            ValueAddEventProcessor revisionProcessor,
                                            java.lang.String eplExpression,
                                            java.lang.String statementName,
                                            boolean isPrioritized,
                                            boolean isEnableSubqueryIndexShare,
                                            boolean enableQueryPlanLog,
                                            MetricReportingService metricReportingService,
                                            boolean isBatchingDataWindow,
                                            boolean isVirtualDataWindow,
                                            java.util.Set<java.lang.String> optionalUniqueKeyProps,
                                            java.lang.String eventTypeAsName,
                                            StatementContext statementContextCreateWindow)
Specified by:
createProcessor in interface NamedWindowDispatchService

createTailView

public NamedWindowTailView createTailView(EventType eventType,
                                          NamedWindowMgmtService namedWindowMgmtService,
                                          NamedWindowDispatchService namedWindowDispatchService,
                                          StatementResultService statementResultService,
                                          ValueAddEventProcessor revisionProcessor,
                                          boolean prioritized,
                                          boolean parentBatchWindow,
                                          java.lang.String contextName,
                                          TimeSourceService timeSourceService,
                                          ConfigurationEngineDefaults.Threading threadingConfig)
Specified by:
createTailView in interface NamedWindowDispatchService

destroy

public void destroy()
Description copied from interface: NamedWindowDispatchService
Destroy service.

Specified by:
destroy in interface NamedWindowDispatchService

addDispatch

public void addDispatch(NamedWindowConsumerLatchFactory latchFactory,
                        NamedWindowDeltaData delta,
                        java.util.Map<EPStatementAgentInstanceHandle,java.util.List<NamedWindowConsumerView>> consumers)
Description copied from interface: NamedWindowDispatchService
For use to add a result of a named window that must be dispatched to consuming views.

Specified by:
addDispatch in interface NamedWindowDispatchService
delta - is the result to dispatch
consumers - is the destination of the dispatch, a map of statements to one or more consuming views

dispatch

public boolean dispatch()
Description copied from interface: NamedWindowDispatchService
Dispatch events of the insert and remove stream of named windows to consumers, as part of the main event processing or dispatch loop.

Specified by:
dispatch in interface NamedWindowDispatchService
Returns:
send events to consuming statements

getDeltaPerConsumer

public java.util.LinkedHashMap<NamedWindowConsumerView,NamedWindowDeltaData> getDeltaPerConsumer(java.lang.Object perStmtObj,
                                                                                                 EPStatementAgentInstanceHandle handle)

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