public class NamedWindowMgmtServiceImpl extends Object implements NamedWindowMgmtService
ERROR_MSG_DATAWINDOWS, ERROR_MSG_NO_DATAWINDOW_ALLOWED
Constructor and Description |
---|
NamedWindowMgmtServiceImpl(boolean enableQueryPlanLog,
MetricReportingService metricReportingService) |
Modifier and Type | Method and Description |
---|---|
void |
addNamedWindowLock(String windowName,
StatementAgentInstanceLock statementResourceLock,
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(String name,
String contextName,
EventType eventType,
StatementResultService statementResultService,
ValueAddEventProcessor revisionProcessor,
String eplExpression,
String statementName,
boolean isPrioritized,
boolean isEnableSubqueryIndexShare,
boolean isBatchingDataWindow,
boolean isVirtualDataWindow,
Set<String> optionalUniqueKeyProps,
String eventTypeAsName,
StatementContext statementContextCreateWindow,
NamedWindowDispatchService namedWindowDispatchService) |
void |
destroy()
Clear out the service.
|
IndexMultiKey[] |
getNamedWindowIndexes(String windowName)
Returns an index descriptor array describing all available indexes for the named window.
|
StatementAgentInstanceLock |
getNamedWindowLock(String windowName)
Returns the statement lock for the named window, to be shared with on-delete statements for the same named window.
|
String[] |
getNamedWindows()
Returns the names of all named windows known.
|
NamedWindowProcessor |
getProcessor(String name)
Returns the processing instance for a given named window.
|
boolean |
isNamedWindow(String name)
Returns true to indicate that the name is a named window.
|
void |
removeNamedWindowIfFound(String namedWindowName)
Remove the named window instance(s), when found
|
void |
removeNamedWindowLock(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(String name)
Upon destroy of the named window creation statement, the named window processor must be removed.
|
public NamedWindowMgmtServiceImpl(boolean enableQueryPlanLog, MetricReportingService metricReportingService)
public void destroy()
NamedWindowMgmtService
destroy
in interface NamedWindowMgmtService
public String[] getNamedWindows()
NamedWindowMgmtService
getNamedWindows
in interface NamedWindowMgmtService
public StatementAgentInstanceLock getNamedWindowLock(String windowName)
NamedWindowMgmtService
getNamedWindowLock
in interface NamedWindowMgmtService
windowName
- is the window namepublic void addNamedWindowLock(String windowName, StatementAgentInstanceLock statementResourceLock, 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(String statementName)
NamedWindowMgmtService
removeNamedWindowLock
in interface NamedWindowMgmtService
statementName
- the name of the statement that is the "create window"public boolean isNamedWindow(String name)
NamedWindowMgmtService
isNamedWindow
in interface NamedWindowMgmtService
name
- is the window namepublic NamedWindowProcessor getProcessor(String name)
NamedWindowMgmtService
getProcessor
in interface NamedWindowMgmtService
name
- window namepublic IndexMultiKey[] getNamedWindowIndexes(String windowName)
NamedWindowMgmtService
getNamedWindowIndexes
in interface NamedWindowMgmtService
windowName
- window namepublic void removeNamedWindowIfFound(String namedWindowName)
NamedWindowMgmtService
removeNamedWindowIfFound
in interface NamedWindowMgmtService
namedWindowName
- to removepublic NamedWindowProcessor addProcessor(String name, String contextName, EventType eventType, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor, String eplExpression, String statementName, boolean isPrioritized, boolean isEnableSubqueryIndexShare, boolean isBatchingDataWindow, boolean isVirtualDataWindow, Set<String> optionalUniqueKeyProps, String eventTypeAsName, StatementContext statementContextCreateWindow, NamedWindowDispatchService namedWindowDispatchService) throws ViewProcessingException
addProcessor
in interface NamedWindowMgmtService
ViewProcessingException
public void removeProcessor(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