public class TupleWindowImpl extends java.lang.Object implements TupleWindow
| Constructor and Description |
|---|
TupleWindowImpl(java.util.List<Tuple> tuples,
java.util.List<Tuple> newTuples,
java.util.List<Tuple> expiredTuples) |
TupleWindowImpl(java.util.List<Tuple> tuples,
java.util.List<Tuple> newTuples,
java.util.List<Tuple> expiredTuples,
java.lang.Long startTimestamp,
java.lang.Long endTimestamp) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<Tuple> |
get()
Gets the list of events in the window.
|
java.lang.Long |
getEndTimestamp()
If processing based on event time, returns the window end time based on watermark otherwise returns the window end time based on
processing time.
|
java.util.List<Tuple> |
getExpired()
Get the list of events expired from the window since the last time the window was generated.
|
java.util.List<Tuple> |
getNew()
Get the list of newly added events in the window since the last time the window was generated.
|
java.lang.Long |
getStartTimestamp()
Returns the window start timestamp.
|
int |
hashCode() |
java.lang.String |
toString() |
public TupleWindowImpl(java.util.List<Tuple> tuples, java.util.List<Tuple> newTuples, java.util.List<Tuple> expiredTuples)
public java.util.List<Tuple> get()
Window
Note: If the number of tuples in windows is huge, invoking get would
load all the tuples into memory and may throw an OOM exception. Use windowing with persistence (BaseStatefulWindowedBolt.withPersistence()) and Window.getIter() to retrieve an iterator over the events in the window.
public java.util.List<Tuple> getNew()
Window
Note: This is not supported when using windowing with persistence (BaseStatefulWindowedBolt.withPersistence()).
public java.util.List<Tuple> getExpired()
Window
Note: This is not supported when using windowing with persistence (BaseStatefulWindowedBolt.withPersistence()).
getExpired in interface Window<Tuple>public java.lang.Long getStartTimestamp()
WindowgetStartTimestamp in interface Window<Tuple>public java.lang.Long getEndTimestamp()
WindowgetEndTimestamp in interface Window<Tuple>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object