|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.view.ViewSupport
net.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 net.esper.view.ViewSupport |
---|
parent |
Constructor Summary | |
---|---|
MergeView(StatementContext statementContext,
String[] groupFieldNames,
EventType resultEventType)
Constructor. |
Method Summary | |
---|---|
void |
addParentView(AddPropertyValueView parentView)
Add a parent data merge view. |
View |
cloneView(StatementContext statementContext)
Duplicates the view. |
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains. |
String[] |
getGroupFieldNames()
Returns the field name that contains the values to group by. |
Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection. |
String |
toString()
|
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent. |
Methods inherited from class net.esper.view.ViewSupport |
---|
addView, dumpChildViews, dumpUpdateParams, findDescendent, getParent, getViews, hasViews, removeView, setParent, updateChildren, updateChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MergeView(StatementContext statementContext, String[] groupFieldNames, EventType resultEventType)
groupFieldNames
- 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 typestatementContext
- contains required view servicesMethod Detail |
---|
public View cloneView(StatementContext statementContext)
CloneableView
Expected to return a same view in initialized state for grouping.
cloneView
in interface CloneableView
statementContext
- is services for the view
public final String[] getGroupFieldNames()
public final void addParentView(AddPropertyValueView parentView)
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 Iterator<EventBean> iterator()
EventCollection
iterator
in interface Iterable<EventBean>
iterator
in interface EventCollection
public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |