|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.named.NamedWindowMgmtServiceImpl
public class NamedWindowMgmtServiceImpl
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.
Field Summary |
---|
Fields inherited from interface com.espertech.esper.epl.named.NamedWindowMgmtService |
---|
ERROR_MSG_DATAWINDOWS, ERROR_MSG_NO_DATAWINDOW_ALLOWED |
Constructor Summary | |
---|---|
NamedWindowMgmtServiceImpl(boolean enableQueryPlanLog,
MetricReportingService metricReportingService)
Ctor. |
Method Summary | |
---|---|
void |
addNamedWindowLock(java.lang.String windowName,
StatementAgentInstanceLock statementResourceLock,
java.lang.String statementName)
Sets the lock to use for a named window. |
void |
addObserver(NamedWindowLifecycleObserver observer)
Add an observer to be called back when named window state changes occur. |
NamedWindowProcessor |
addProcessor(java.lang.String name,
java.lang.String contextName,
EventType eventType,
StatementResultService statementResultService,
ValueAddEventProcessor revisionProcessor,
java.lang.String eplExpression,
java.lang.String statementName,
boolean isPrioritized,
boolean isEnableSubqueryIndexShare,
boolean isBatchingDataWindow,
boolean isVirtualDataWindow,
java.util.Set<java.lang.String> optionalUniqueKeyProps,
java.lang.String eventTypeAsName,
StatementContext statementContextCreateWindow,
NamedWindowDispatchService namedWindowDispatchService)
Create a new named window. |
void |
destroy()
Clear out the service. |
IndexMultiKey[] |
getNamedWindowIndexes(java.lang.String windowName)
Returns an index descriptor array describing all available indexes for the named window. |
StatementAgentInstanceLock |
getNamedWindowLock(java.lang.String windowName)
Returns the statement lock for the named window, to be shared with on-delete statements for the same named window. |
java.lang.String[] |
getNamedWindows()
Returns the names of all named windows known. |
NamedWindowProcessor |
getProcessor(java.lang.String name)
Returns the processing instance for a given named window. |
boolean |
isNamedWindow(java.lang.String name)
Returns true to indicate that the name is a named window. |
void |
removeNamedWindowIfFound(java.lang.String namedWindowName)
Remove the named window instance(s), when found |
void |
removeNamedWindowLock(java.lang.String statementName)
Remove the lock associated to the named window. |
void |
removeObserver(NamedWindowLifecycleObserver observer)
Remove an observer to be called back when named window state changes occur. |
void |
removeProcessor(java.lang.String name)
Upon destroy of the named window creation statement, the named window processor must be removed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedWindowMgmtServiceImpl(boolean enableQueryPlanLog, MetricReportingService metricReportingService)
Method Detail |
---|
public void destroy()
NamedWindowMgmtService
destroy
in interface NamedWindowMgmtService
public java.lang.String[] getNamedWindows()
NamedWindowMgmtService
getNamedWindows
in interface NamedWindowMgmtService
public StatementAgentInstanceLock getNamedWindowLock(java.lang.String windowName)
NamedWindowMgmtService
getNamedWindowLock
in interface NamedWindowMgmtService
windowName
- is the window name
public void addNamedWindowLock(java.lang.String windowName, StatementAgentInstanceLock statementResourceLock, java.lang.String statementName)
NamedWindowMgmtService
addNamedWindowLock
in interface NamedWindowMgmtService
windowName
- is the named window namestatementResourceLock
- is the statement lock for the create window statementstatementName
- the name of the statement that is the "create window"public void removeNamedWindowLock(java.lang.String statementName)
NamedWindowMgmtService
removeNamedWindowLock
in interface NamedWindowMgmtService
statementName
- the name of the statement that is the "create window"public boolean isNamedWindow(java.lang.String name)
NamedWindowMgmtService
isNamedWindow
in interface NamedWindowMgmtService
name
- is the window name
public NamedWindowProcessor getProcessor(java.lang.String name)
NamedWindowMgmtService
getProcessor
in interface NamedWindowMgmtService
name
- window name
public IndexMultiKey[] getNamedWindowIndexes(java.lang.String windowName)
NamedWindowMgmtService
getNamedWindowIndexes
in interface NamedWindowMgmtService
windowName
- window name
public void removeNamedWindowIfFound(java.lang.String namedWindowName)
NamedWindowMgmtService
removeNamedWindowIfFound
in interface NamedWindowMgmtService
namedWindowName
- to removepublic NamedWindowProcessor addProcessor(java.lang.String name, java.lang.String contextName, EventType eventType, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor, java.lang.String eplExpression, java.lang.String statementName, boolean isPrioritized, boolean isEnableSubqueryIndexShare, boolean isBatchingDataWindow, boolean isVirtualDataWindow, java.util.Set<java.lang.String> optionalUniqueKeyProps, java.lang.String eventTypeAsName, StatementContext statementContextCreateWindow, NamedWindowDispatchService namedWindowDispatchService) throws ViewProcessingException
NamedWindowMgmtService
addProcessor
in interface NamedWindowMgmtService
name
- window nameeventType
- the event type of the windowstatementResultService
- for coordinating on whether insert and remove stream events should be postedrevisionProcessor
- handles update eventseplExpression
- is the expressionstatementName
- the name of the statementisPrioritized
- if the engine is running with prioritized execution
ViewProcessingException
- if the named window already existspublic void removeProcessor(java.lang.String name)
NamedWindowMgmtService
removeProcessor
in interface NamedWindowMgmtService
name
- is the named window namepublic void addObserver(NamedWindowLifecycleObserver observer)
NamedWindowMgmtService
Observers have set-semantics: the same Observer cannot be added twice
addObserver
in interface NamedWindowMgmtService
observer
- to addpublic void removeObserver(NamedWindowLifecycleObserver observer)
NamedWindowMgmtService
removeObserver
in interface NamedWindowMgmtService
observer
- to remove
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |