public abstract class CreateWindowStrategy extends Object
GroupByReader
opens a new sliding window.Constructor and Description |
---|
CreateWindowStrategy() |
Modifier and Type | Method and Description |
---|---|
static CreateWindowStrategy |
and(CreateWindowStrategy... strategies)
Opens a new window if all of the supplied strategies request it.
|
boolean |
isPollingRequired()
Indicates if the {@link #shouldCreate(GroupByReader, Record) method should be called every second -- even
if no new data is present -- to allow windows to be created (passing in a
null record). |
static CreateWindowStrategy |
limitOpened(int maxOpenedWindows)
Opens a new window if there are less currently open than the specified number.
|
static CreateWindowStrategy |
or(CreateWindowStrategy... strategies)
Opens a new window if any of the supplied strategies request it.
|
static CreateWindowStrategy |
recordPeriod(int recordPeriod)
Opens a new window at set record count intervals or on the first record.
|
abstract boolean |
shouldCreate(GroupByReader groupByReader,
Record record) |
static CreateWindowStrategy |
startInterval(long intervalMilliseconds)
Opens a new window at set time intervals.
|
public abstract boolean shouldCreate(GroupByReader groupByReader, Record record)
public boolean isPollingRequired()
null
record).public static CreateWindowStrategy limitOpened(int maxOpenedWindows)
maxOpenedWindows
- the number of widows that should be open at any time.public static CreateWindowStrategy recordPeriod(int recordPeriod)
recordPeriod
- the number of records to wait for before opening a new window.public static CreateWindowStrategy startInterval(long intervalMilliseconds)
intervalMilliseconds
- the number of milliseconds wait before opening a new window.public static CreateWindowStrategy or(CreateWindowStrategy... strategies)
public static CreateWindowStrategy and(CreateWindowStrategy... strategies)
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.