Class WindowImpl<T>
- java.lang.Object
-
- org.apache.pulsar.functions.windowing.WindowImpl<T>
-
-
Constructor Summary
Constructors Constructor Description WindowImpl(java.util.List<T> tuples, java.util.List<T> newTuples, java.util.List<T> expiredTuples, java.lang.Long startTimestamp, java.lang.Long endTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<T>get()Gets the list of events in the window.java.lang.LonggetEndTimestamp()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<T>getExpired()Get the list of events expired from the window since the last time the window was generated.java.util.List<T>getNew()Get the list of newly added events in the window since the last time the window was generated.java.lang.LonggetStartTimestamp()Returns the window start timestamp.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
get
public java.util.List<T> get()
Description copied from interface:WindowGets the list of events in the window.Note: If the number of tuples in windows is huge, invoking
getwould load all the tuples into memory and may throw an OOM exception. Use windowing with persistence
-
getNew
public java.util.List<T> getNew()
Description copied from interface:WindowGet the list of newly added events in the window since the last time the window was generated.
-
getExpired
public java.util.List<T> getExpired()
Description copied from interface:WindowGet the list of events expired from the window since the last time the window was generated.- Specified by:
getExpiredin interfaceWindow<T>- Returns:
- the list of events expired from the window.
-
getStartTimestamp
public java.lang.Long getStartTimestamp()
Description copied from interface:WindowReturns the window start timestamp. Will return null if the window length is not based on time duration.- Specified by:
getStartTimestampin interfaceWindow<T>- Returns:
- the window start timestamp or null if the window length is not time based
-
getEndTimestamp
public java.lang.Long getEndTimestamp()
Description copied from interface:WindowIf processing based on event time, returns the window end time based on watermark otherwise returns the window end time based on processing time.- Specified by:
getEndTimestampin interfaceWindow<T>- Returns:
- the window end timestamp
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-