|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.view.ViewSupport
com.espertech.esper.view.std.MergeView
public final class MergeView
The merge view works together with a group view that splits the data in a stream to multiple subviews, based on a key index. Every group view requires a merge view to merge the many subviews back into a single view. Typically the last view in a chain containing a group view is a merge view. The merge view has no other responsibility then becoming the single last instance in the chain to which external listeners for updates can be attached to receive updates for the many subviews that have this merge view as common child views. The parent view of this view is generally the AddPropertyValueView that adds the grouped-by information back into the data.
Field Summary |
---|
Fields inherited from class com.espertech.esper.view.ViewSupport |
---|
EMPTY_VIEW_ARRAY, parent |
Constructor Summary | |
---|---|
MergeView(AgentInstanceViewFactoryChainContext agentInstanceContext,
ExprNode[] groupCriteria,
EventType resultEventType,
boolean removable)
Constructor. |
Method Summary | |
---|---|
void |
addParentView(AddPropertyValueView parentView)
Add a parent data merge view. |
View |
cloneView()
Duplicates the view. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
ExprNode[] |
getGroupFieldNames()
Returns the field name that contains the values to group by. |
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection. |
void |
removeParentView(View view)
|
java.lang.String |
toString()
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent. |
Methods inherited from class com.espertech.esper.view.ViewSupport |
---|
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, setParent, updateChildren, updateChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.espertech.esper.view.View |
---|
getParent, setParent |
Methods inherited from interface com.espertech.esper.view.Viewable |
---|
addView, getViews, hasViews, removeAllViews, removeView |
Constructor Detail |
---|
public MergeView(AgentInstanceViewFactoryChainContext agentInstanceContext, ExprNode[] groupCriteria, EventType resultEventType, boolean removable)
groupCriteria
- is the fields from which to pull the value to group byresultEventType
- is passed by the factory as the factory adds the merged fields to an event typeMethod Detail |
---|
public View cloneView()
CloneableView
Expected to return a same view in initialized state for grouping.
cloneView
in interface CloneableView
public final ExprNode[] getGroupFieldNames()
getGroupFieldNames
in interface MergeViewMarker
public final void addParentView(AddPropertyValueView parentView)
addParentView
in interface MergeViewMarker
parentView
- is the parent data merge view to addpublic final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public final void update(EventBean[] newData, EventBean[] oldData)
View
update
in interface View
newData
- is the new data that has been added to the parent viewoldData
- is the old data that has been removed from the parent viewpublic final java.util.Iterator<EventBean> iterator()
EventCollection
iterator
in interface EventCollection
iterator
in interface java.lang.Iterable<EventBean>
public final java.lang.String toString()
toString
in class java.lang.Object
public void removeParentView(View view)
|
© 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 |