com.espertech.esper.view.window
Class ExpressionViewFactoryBase
java.lang.Object
com.espertech.esper.view.window.ExpressionViewFactoryBase
- All Implemented Interfaces:
- DataWindowViewFactory, DataWindowViewWithPrevious, ViewFactory
- Direct Known Subclasses:
- ExpressionBatchViewFactory, ExpressionWindowViewFactory
public abstract class ExpressionViewFactoryBase
- extends java.lang.Object
- implements DataWindowViewFactory, DataWindowViewWithPrevious
Base factory for expression-based window and batch view.
Method Summary |
void |
attach(EventType parentEventType,
StatementContext statementContext,
ViewFactory optionalParentFactory,
java.util.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)
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. |
EventType |
getBuiltinMapType()
|
EventType |
getEventType()
Returns the event type that the view that is created by the view factory would create for events posted
by the view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expiryExpression
protected ExprNode expiryExpression
variableNames
protected java.util.Set<java.lang.String> variableNames
aggregationServiceFactoryDesc
protected AggregationServiceFactoryDesc aggregationServiceFactoryDesc
builtinMapType
protected EventType builtinMapType
ExpressionViewFactoryBase
public ExpressionViewFactoryBase()
attach
public void attach(EventType parentEventType,
StatementContext statementContext,
ViewFactory optionalParentFactory,
java.util.List<ViewFactory> parentViewFactories)
throws ViewParameterException
- Description copied from interface:
ViewFactory
- Attaches the factory to a parent event type such that the factory can validate
attach requirements and determine an event type for resulting views.
- Specified by:
attach
in interface ViewFactory
- Parameters:
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 none
- Throws:
ViewParameterException
- is thrown to indicate that this view factories's view would not play
with the parent view factories view
getEventType
public EventType getEventType()
- Description copied from interface:
ViewFactory
- Returns the event type that the view that is created by the view factory would create for events posted
by the view.
- Specified by:
getEventType
in interface ViewFactory
- Returns:
- event type of view's created by the view factory
canReuse
public boolean canReuse(View view)
- Description copied from interface:
ViewFactory
- 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.
- Specified by:
canReuse
in interface ViewFactory
- Parameters:
view
- is the candidate view to compare to
- Returns:
- true if the given view can be reused instead of creating a new view, or false to indicate
the view is not right for reuse
getBuiltinMapType
public EventType getBuiltinMapType()