public class Windowing
extends java.lang.Object
| Constructor and Description |
|---|
Windowing() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.lang.Iterable<TimeWindow<T>> |
toSessionWindows(java.util.List<T> source,
TimestampSelector<T> selector,
long start,
long end,
long timeout)
Transforms a List into an iterable collection of session TimeWindows.
|
static <T> java.lang.Iterable<TimeWindow<T>> |
toSlidingWindows(java.util.List<T> source,
TimestampSelector<T> selector,
long start,
long end,
long duration,
long every)
Transforms a List into an iterable collection of sliding TimeWindows
|
static <T> java.lang.Iterable<TimeWindow<T>> |
toTumblingWindows(java.util.List<T> source,
TimestampSelector<T> selector,
long start,
long end,
long duration)
Transforms a List into an iterable collection of tumbling TimeWindows.
|
public static <T> java.lang.Iterable<TimeWindow<T>> toSessionWindows(java.util.List<T> source, TimestampSelector<T> selector, long start, long end, long timeout)
T - the type of objects in the source collectionsource - the source collectionselector - the selector used to pull timestamps from objectsstart - the start time to use when scanning the collectiontimeout - the minimum amount of time between session window rangesend - the end time to use when scanning the collectionpublic static <T> java.lang.Iterable<TimeWindow<T>> toTumblingWindows(java.util.List<T> source, TimestampSelector<T> selector, long start, long end, long duration)
T - the type of objects in the source collectionsource - the source collectionselector - the selector used to pull timestamps from objectsstart - the start time to use when scanning the collectionend - the end time to use when scanning the collectionduration - the length of time in each time windowpublic static <T> java.lang.Iterable<TimeWindow<T>> toSlidingWindows(java.util.List<T> source, TimestampSelector<T> selector, long start, long end, long duration, long every)
T - the type of objects in the source collectionsource - the source collectionselector - the selector used to pull timestamp from objectsstart - the start time to use when scanning the collectionend - the end time to use when scanning the collectionduration - the length of time in each time windowevery - the time between the starting point of each time window