public class TimeOrderView extends ViewSupport implements DataWindowView, CloneableView, StoppableView, StopCallback
The insert stream consists of all arriving events. The remove stream consists of events in order of timestamp value as supplied by each event.
Timestamp values on events should match engine time. The window compares engine time to timestamp value and releases events when the event's timestamp is less then engine time minus interval size (the event is older then the window tail).
The view accepts 2 parameters. The first parameter is the field name to get the event timestamp value from, the second parameter defines the interval size.
EMPTY_VIEW_ARRAY
Constructor and Description |
---|
TimeOrderView(AgentInstanceViewFactoryChainContext agentInstanceContext,
TimeOrderViewFactory timeOrderViewFactory,
ExprNode timestampExpr,
ExprEvaluator timestampEvaluator,
ExprTimePeriodEvalDeltaConst timeDeltaComputation,
IStreamSortRankRandomAccess optionalSortedRandomAccess)
Ctor.
|
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 timestamp property name.
|
void |
internalHandleAdd(java.lang.Object sortValues,
EventBean newDataItem) |
void |
internalHandleExpired(java.lang.Object sortValues,
EventBean oldDataItem) |
void |
internalHandleExpired(java.lang.Object sortValues,
java.util.List<EventBean> oldDataItems) |
void |
internalHandleRemoved(java.lang.Object sortValues,
EventBean oldDataItem) |
boolean |
isEmpty()
True to indicate the sort window is empty, or false if not empty.
|
java.util.Iterator<EventBean> |
iterator()
Allows iteration through all elements in this event collection.
|
void |
stop()
Stops the underlying resources.
|
void |
stopSchedule() |
void |
stopView() |
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 TimeOrderView(AgentInstanceViewFactoryChainContext agentInstanceContext, TimeOrderViewFactory timeOrderViewFactory, ExprNode timestampExpr, ExprEvaluator timestampEvaluator, ExprTimePeriodEvalDeltaConst timeDeltaComputation, IStreamSortRankRandomAccess optionalSortedRandomAccess)
optionalSortedRandomAccess
- is the friend class handling the random access, if required by
expressionstimeOrderViewFactory
- for copying this view in a group-bytimestampExpr
- the property name of the event supplying timestamp valuespublic ExprNode getTimestampExpression()
public ExprTimePeriodEvalDeltaConst getTimeDeltaComputation()
public View cloneView()
CloneableView
Expected to return a same view in initialized state for grouping.
cloneView
in interface CloneableView
public final EventType getEventType()
EventCollection
getEventType
in interface EventCollection
public final void update(EventBean[] newData, EventBean[] oldData)
View
public void internalHandleAdd(java.lang.Object sortValues, EventBean newDataItem)
public void internalHandleRemoved(java.lang.Object sortValues, EventBean oldDataItem)
public void internalHandleExpired(java.lang.Object sortValues, EventBean oldDataItem)
public void internalHandleExpired(java.lang.Object sortValues, java.util.List<EventBean> oldDataItems)
public boolean isEmpty()
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 void stopView()
stopView
in interface StoppableView
public void stop()
StopCallback
stop
in interface StopCallback
public void stopSchedule()