public interface ViewService
Modifier and Type | Method and Description |
---|---|
ViewFactoryChain |
createFactories(int streamNum,
EventType parentEventType,
ViewSpec[] viewSpecList,
StreamSpecOptions options,
StatementContext context,
boolean isSubquery,
int subqueryNumber)
Returns a chain of view factories that can be used to obtain the final event type,
and that can later be used to actually create the chain of views or reuse existing views.
|
ViewServiceCreateResult |
createViews(Viewable eventStreamViewable,
List<ViewFactory> viewFactoryChain,
AgentInstanceViewFactoryChainContext viewFactoryChainContext,
boolean hasPreviousNode)
Creates the views given a chain of view factories.
|
void |
remove(EventStream eventStream,
Viewable view)
Removes a view discoupling the view and any of it's parent views up the tree to the last shared parent view.
|
ViewFactoryChain createFactories(int streamNum, EventType parentEventType, ViewSpec[] viewSpecList, StreamSpecOptions options, StatementContext context, boolean isSubquery, int subqueryNumber) throws ViewProcessingException
Does not actually hook up the view factories or views against the event stream, but creates view factories and sets parameters on each view factory as supplied. Determines if view factories are compatible in the chain via the attach method.
streamNum
- - the stream number starting at zero, a join would have N streamsparentEventType
- - is the event type of the event stream that originates the raw eventsviewSpecList
- - the specification for each view factory in the chain to be createdcontext
- - dependent servicesoptions
- - stream options such as unidirectional, retain-union etcsubqueryNumber
- subquery numisSubquery
- subquery indicatorViewProcessingException
- thrown if a view factory doesn't take parameters as supplied,
or cannot hook onto it's parent view or event streamViewServiceCreateResult createViews(Viewable eventStreamViewable, List<ViewFactory> viewFactoryChain, AgentInstanceViewFactoryChainContext viewFactoryChainContext, boolean hasPreviousNode)
Attempts to reuse compatible views under then parent event stream viewable as indicated by each view factories reuse method.
eventStreamViewable
- is the event stream to hook intoviewFactoryChain
- defines the list of view factorys to call makeView or canReuse onviewFactoryChainContext
- provides serviceshasPreviousNode
- indicator whether previous-exprvoid remove(EventStream eventStream, Viewable view)
eventStream
- - the event stream that originates the raw eventsview
- - the view (should be the last in a chain) to remove