public class ExternallyTimedWindowView extends ViewSupport implements DataWindowView, CloneableView
EMPTY_VIEW_ARRAY
Constructor and Description |
---|
ExternallyTimedWindowView(ExternallyTimedWindowViewFactory externallyTimedWindowViewFactory,
ExprNode timestampExpression,
ExprEvaluator timestampExpressionEval,
ExprTimePeriodEvalDeltaConst timeDeltaComputation,
ViewUpdatedCollection viewUpdatedCollection,
AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
View |
cloneView()
Duplicates the view.
|
EventType |
getEventType()
Provides metadata information about the type of object the event collection contains.
|
ExprTimePeriodEvalDeltaConst |
getTimeDeltaComputation() |
ExprNode |
getTimestampExpression()
Returns the field name to get timestamp values from.
|
ViewUpdatedCollection |
getViewUpdatedCollection() |
boolean |
isEmpty()
Returns true to indicate the window is empty, or false if the view is not empty.
|
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection.
|
java.lang.String |
toString() |
void |
update(EventBean[] newData,
EventBean[] oldData)
Notify that data has been added or removed from the Viewable parent.
|
void |
visitView(ViewDataVisitor viewDataVisitor) |
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, setParent, updateChildren
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addView, getViews, hasViews, removeAllViews, removeView
public ExternallyTimedWindowView(ExternallyTimedWindowViewFactory externallyTimedWindowViewFactory, ExprNode timestampExpression, ExprEvaluator timestampExpressionEval, ExprTimePeriodEvalDeltaConst timeDeltaComputation, ViewUpdatedCollection viewUpdatedCollection, AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext)
timestampExpression
- is the field name containing a long timestamp value
that should be in ascending order for the natural order of events and is intended to reflect
System.currentTimeInMillis but does not necessarily have to.
out of the window as oldData in the update method. The view compares
each events timestamp against the newest event timestamp and those with a delta
greater then secondsBeforeExpiry are pushed out of the window.viewUpdatedCollection
- is a collection that the view must update when receiving eventsexternallyTimedWindowViewFactory
- for copying this view in a group-byagentInstanceViewFactoryContext
- context for expression evalauationpublic View cloneView()
CloneableView
Expected to return a same view in initialized state for grouping.
cloneView
in interface CloneableView
public final ExprNode getTimestampExpression()
public ExprTimePeriodEvalDeltaConst getTimeDeltaComputation()
public final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public final void update(EventBean[] newData, EventBean[] oldData)
View
public 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 visitView(ViewDataVisitor viewDataVisitor)
visitView
in interface ViewDataVisitable
public boolean isEmpty()
public ViewUpdatedCollection getViewUpdatedCollection()