|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.view.stream.StreamFactorySvcReuse
public class StreamFactorySvcReuse
Service implementation to reuse event streams and existing filters using reference counting to remove filters when not used.
This can be very effective in that if a client applications creates a large number of very similar statements in terms of filters and views used then these resources are all re-used across statements.
The re-use is multithread-safe in that (A) statement start/stop is locked against other engine processing (B) the first statement supplies the lock for shared filters and views, protecting multiple threads from entering into the same view. (C) joins statements do not participate in filter and view reuse
Constructor Summary | |
---|---|
StreamFactorySvcReuse()
Ctor. |
Method Summary | |
---|---|
EventStream |
createStream(FilterSpec filterSpec,
FilterService filterService,
EPStatementHandle epStatementHandle)
See the method of the same name in StreamFactoryService . |
void |
dropStream(FilterSpec filterSpec,
FilterService filterService)
See the method of the same name in StreamFactoryService . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamFactorySvcReuse()
Method Detail |
---|
public EventStream createStream(FilterSpec filterSpec, FilterService filterService, EPStatementHandle epStatementHandle)
StreamFactoryService
. Always attempts to reuse an existing event stream.
May thus return a new event stream or an existing event stream depending on whether filter criteria match.
filterSpec
- is the filter definitionfilterService
- is the filtering serviceepStatementHandle
- is the statement resource lock
public void dropStream(FilterSpec filterSpec, FilterService filterService)
StreamFactoryService
.
filterSpec
- is the filter definitionfilterService
- is the filtering service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |