|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.view.ViewServiceHelper
public class ViewServiceHelper
Utility methods to deal with chains of views, and for merge/group-by views.
Constructor Summary | |
---|---|
ViewServiceHelper()
|
Method Summary | |
---|---|
protected static void |
addMergeViews(java.util.List<ViewSpec> specifications)
Add merge views for any views in the chain requiring a merge (group view). |
static IStreamRandomAccess |
getOptPreviousExprRandomAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
|
static IStreamRelativeAccess |
getOptPreviousExprRelativeAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
|
static IStreamSortRankRandomAccess |
getOptPreviousExprSortedRankedAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
|
static java.util.Set<java.lang.String> |
getUniqueCandidateProperties(java.util.List<ViewFactory> viewFactory,
java.lang.annotation.Annotation[] annotations)
|
protected static java.util.List<View> |
instantiateChain(Viewable parentViewable,
java.util.List<ViewFactory> viewFactories,
AgentInstanceViewFactoryChainContext viewFactoryChainContext)
Instantiate a chain of views. |
static java.util.List<ViewFactory> |
instantiateFactories(int streamNum,
java.util.List<ViewSpec> viewSpecList,
StatementContext statementContext)
Given a list of view specifications obtained from by parsing this method instantiates a list of view factories. |
protected static Pair<Viewable,java.util.List<View>> |
matchExistingViews(Viewable rootViewable,
java.util.List<ViewFactory> viewFactories)
Match the views under the stream to the list of view specications passed in. |
protected static java.util.List<View> |
removeChainLeafView(Viewable parentViewable,
Viewable viewToRemove)
Removes a view from a parent view returning the orphaned parent views in a list. |
static void |
removeFirstUnsharedView(java.util.List<View> childViews)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewServiceHelper()
Method Detail |
---|
public static java.util.Set<java.lang.String> getUniqueCandidateProperties(java.util.List<ViewFactory> viewFactory, java.lang.annotation.Annotation[] annotations)
public static IStreamRandomAccess getOptPreviousExprRandomAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
public static IStreamRelativeAccess getOptPreviousExprRelativeAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
public static IStreamSortRankRandomAccess getOptPreviousExprSortedRankedAccess(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
protected static void addMergeViews(java.util.List<ViewSpec> specifications) throws ViewProcessingException
specifications
- is a list of view definitions defining the chain of views.
ViewProcessingException
- indicating that the view chain configuration is invalidprotected static java.util.List<View> instantiateChain(Viewable parentViewable, java.util.List<ViewFactory> viewFactories, AgentInstanceViewFactoryChainContext viewFactoryChainContext)
parentViewable
- - parent view to add the chain toviewFactories
- - is the view factories to use to make each view, or reuse and existing view
public static void removeFirstUnsharedView(java.util.List<View> childViews)
protected static java.util.List<View> removeChainLeafView(Viewable parentViewable, Viewable viewToRemove)
parentViewable
- - parent to remove view fromviewToRemove
- - view to remove
protected static Pair<Viewable,java.util.List<View>> matchExistingViews(Viewable rootViewable, java.util.List<ViewFactory> viewFactories)
rootViewable
- is the top rootViewable event stream to which all views are attached as child views
This parameter is changed by this method, ie. specifications are removed if they match existing views.viewFactories
- is the view specifications for making views
public static java.util.List<ViewFactory> instantiateFactories(int streamNum, java.util.List<ViewSpec> viewSpecList, StatementContext statementContext) throws ViewProcessingException
streamNum
- is the stream numberviewSpecList
- is the view definitionstatementContext
- is statement service context and statement info
ViewProcessingException
- if the factory cannot be creates such as for invalid view spec
|
© 2006-2015 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 |