com.espertech.esper.dispatch
Interface DispatchService

All Known Implementing Classes:
DispatchServiceImpl

public interface DispatchService

Service for dispatching internally (for operators/views processing results of prior operators/views) and externally (dispatch events to UpdateListener implementations). The service accepts Dispatchable implementations to its internal and external lists. When a client invokes dispatch the implementation first invokes all internal Dispatchable instances then all external Dispatchable instances. Dispatchables are invoked in the same order they are added. Any dispatchable added twice is dispatched once.

Note: Each execution thread owns its own dispatch queue. Note: Dispatchs could result in further call to the dispatch service. This is because listener code that is invoked as a result of a dispatch may create patterns that fireStatementStopped as soon as they are started resulting in further dispatches within the same thread. Thus the implementation class must be careful with the use of iterators to avoid ConcurrentModificationException errors.


Method Summary
 void addExternal(Dispatchable dispatchable)
          Add a Dispatchable implementation.
 void dispatch()
          Execute all Dispatchable implementations added to the service since the last invocation of this method.
 

Method Detail

addExternal

void addExternal(Dispatchable dispatchable)
Add a Dispatchable implementation.

Parameters:
dispatchable - to execute later

dispatch

void dispatch()
Execute all Dispatchable implementations added to the service since the last invocation of this method.


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