public class GroupByViewFactory extends Object implements ViewFactory, GroupByViewFactoryMarker
GroupByView
instances.Modifier and Type | Field and Description |
---|---|
protected ExprEvaluator[] |
criteriaExpressionEvals |
protected ExprNode[] |
criteriaExpressions
List of criteria expressions.
|
protected boolean |
isReclaimAged |
protected double |
reclaimFrequency |
protected double |
reclaimMaxAge |
protected List<ExprNode> |
viewParameters
View parameters.
|
Constructor and Description |
---|
GroupByViewFactory() |
Modifier and Type | Method and Description |
---|---|
void |
attach(EventType parentEventType,
StatementContext statementContext,
ViewFactory optionalParentFactory,
List<ViewFactory> parentViewFactories)
Attaches the factory to a parent event type such that the factory can validate
attach requirements and determine an event type for resulting views.
|
boolean |
canReuse(View view,
AgentInstanceContext agentInstanceContext)
Determines if the given view could be used instead of creating a new view,
requires the view factory to compare view type, parameters and other capabilities provided.
|
ExprEvaluator[] |
getCriteriaExpressionEvals() |
ExprNode[] |
getCriteriaExpressions()
Returns the names of fields to group by
|
EventType |
getEventType()
Returns the event type that the view that is created by the view factory would create for events posted
by the view.
|
double |
getReclaimFrequency() |
double |
getReclaimMaxAge() |
String |
getViewName()
Returns the name of the view, not namespace+name but readable name.
|
boolean |
isReclaimAged() |
View |
makeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
Create a new view.
|
void |
setViewParameters(ViewFactoryContext viewFactoryContext,
List<ExprNode> expressionParameters)
Indicates user EPL query view parameters to the view factory.
|
protected ExprNode[] criteriaExpressions
protected ExprEvaluator[] criteriaExpressionEvals
protected boolean isReclaimAged
protected double reclaimMaxAge
protected double reclaimFrequency
public void setViewParameters(ViewFactoryContext viewFactoryContext, List<ExprNode> expressionParameters) throws ViewParameterException
ViewFactory
setViewParameters
in interface ViewFactory
viewFactoryContext
- supplied context information for the view factoryexpressionParameters
- is the objects representing the view parametersViewParameterException
- if the parameters don't match view parameter needspublic void attach(EventType parentEventType, StatementContext statementContext, ViewFactory optionalParentFactory, List<ViewFactory> parentViewFactories) throws ViewParameterException
ViewFactory
attach
in interface ViewFactory
parentEventType
- is the parent event stream's or view factory's event typestatementContext
- contains the services needed for creating a new event typeoptionalParentFactory
- is null when there is no parent view factory, or contains the
parent view factoryparentViewFactories
- is a list of all the parent view factories or empty list if there are noneViewParameterException
- is thrown to indicate that this view factories's view would not play
with the parent view factories viewpublic ExprNode[] getCriteriaExpressions()
getCriteriaExpressions
in interface GroupByViewFactoryMarker
public View makeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
ViewFactory
makeView
in interface ViewFactory
agentInstanceViewFactoryContext
- contextpublic EventType getEventType()
ViewFactory
getEventType
in interface ViewFactory
public boolean canReuse(View view, AgentInstanceContext agentInstanceContext)
ViewFactory
canReuse
in interface ViewFactory
view
- is the candidate view to compare toagentInstanceContext
- agent instance contextpublic boolean isReclaimAged()
isReclaimAged
in interface GroupByViewFactoryMarker
public double getReclaimMaxAge()
public double getReclaimFrequency()
public String getViewName()
ViewFactory
getViewName
in interface ViewFactory
public ExprEvaluator[] getCriteriaExpressionEvals()