|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.named.NamedWindowServiceImpl
public class NamedWindowServiceImpl
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 net.esper.eql.named.NamedWindowService |
---|
ERROR_MSG_DATAWINDOWS, ERROR_MSG_NO_DATAWINDOW_ALLOWED |
Constructor Summary | |
---|---|
NamedWindowServiceImpl(StatementLockFactory statementLockFactory,
VariableService variableService)
Ctor. |
Method Summary | |
---|---|
void |
addDispatch(NamedWindowDeltaData delta,
Map<EPStatementHandle,List<NamedWindowConsumerView>> consumers)
For use to add a result of a named window that must be dispatched to consuming views. |
void |
addNamedWindowLock(String windowName,
ManagedLock statementResourceLock)
Sets the lock to use for a named window. |
NamedWindowProcessor |
addProcessor(String name,
EventType eventType)
Create a new named window. |
void |
destroy()
Clear out the 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. |
ManagedLock |
getNamedWindowLock(String windowName)
Returns the statement lock for the named window, to be shared with on-delete statements for the same named window. |
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 |
removeProcessor(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 NamedWindowServiceImpl(StatementLockFactory statementLockFactory, VariableService variableService)
statementLockFactory
- statement lock factoryvariableService
- is for variable accessMethod Detail |
---|
public void destroy()
NamedWindowService
destroy
in interface NamedWindowService
public ManagedLock getNamedWindowLock(String windowName)
NamedWindowService
getNamedWindowLock
in interface NamedWindowService
windowName
- is the window name
public void addNamedWindowLock(String windowName, ManagedLock statementResourceLock)
NamedWindowService
addNamedWindowLock
in interface NamedWindowService
windowName
- is the named window namestatementResourceLock
- is the statement lock for the create window statementpublic boolean isNamedWindow(String name)
NamedWindowService
isNamedWindow
in interface NamedWindowService
name
- is the window name
public NamedWindowProcessor getProcessor(String name)
NamedWindowService
getProcessor
in interface NamedWindowService
name
- window name
public NamedWindowProcessor addProcessor(String name, EventType eventType) throws ViewProcessingException
NamedWindowService
addProcessor
in interface NamedWindowService
name
- window nameeventType
- the event type of the window
ViewProcessingException
- if the named window already existspublic void removeProcessor(String name)
NamedWindowService
removeProcessor
in interface NamedWindowService
name
- is the named window namepublic void addDispatch(NamedWindowDeltaData delta, Map<EPStatementHandle,List<NamedWindowConsumerView>> consumers)
NamedWindowService
addDispatch
in interface NamedWindowService
delta
- is the result to dispatchconsumers
- is the destination of the dispatch, a map of statements to one or more consuming viewspublic boolean dispatch()
NamedWindowService
dispatch
in interface NamedWindowService
|
© 2007 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 |