public final class ViewServiceImpl extends Object implements ViewService
Constructor and Description |
---|
ViewServiceImpl()
Ctor.
|
Modifier and Type | Method and Description |
---|---|
ViewFactoryChain |
createFactories(int streamNum,
EventType parentEventType,
ViewSpec[] viewSpecDefinitions,
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> viewFactories,
AgentInstanceViewFactoryChainContext viewFactoryChainContext,
boolean hasPreviousNode)
Creates the views given a chain of view factories.
|
void |
remove(EventStream eventStream,
Viewable viewToRemove)
Removes a view discoupling the view and any of it's parent views up the tree to the last shared parent view.
|
public ViewFactoryChain createFactories(int streamNum, EventType parentEventType, ViewSpec[] viewSpecDefinitions, StreamSpecOptions options, StatementContext context, boolean isSubquery, int subqueryNumber) throws ViewProcessingException
ViewService
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.
createFactories
in interface ViewService
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 eventsviewSpecDefinitions
- - the specification for each view factory in the chain to be createdoptions
- - stream options such as unidirectional, retain-union etccontext
- - dependent servicesisSubquery
- subquery indicatorsubqueryNumber
- subquery numViewProcessingException
- thrown if a view factory doesn't take parameters as supplied,
or cannot hook onto it's parent view or event streampublic ViewServiceCreateResult createViews(Viewable eventStreamViewable, List<ViewFactory> viewFactories, AgentInstanceViewFactoryChainContext viewFactoryChainContext, boolean hasPreviousNode)
ViewService
Attempts to reuse compatible views under then parent event stream viewable as indicated by each view factories reuse method.
createViews
in interface ViewService
eventStreamViewable
- is the event stream to hook intoviewFactories
- defines the list of view factorys to call makeView or canReuse onviewFactoryChainContext
- provides serviceshasPreviousNode
- indicator whether previous-exprpublic void remove(EventStream eventStream, Viewable viewToRemove)
ViewService
remove
in interface ViewService
eventStream
- - the event stream that originates the raw eventsviewToRemove
- - the view (should be the last in a chain) to remove