public class Window extends Object implements Configurable, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Window.Classification
Represents the type of window.
|
static class |
Window.Unit
Represents the type of the window unit for either emit or include.
|
Modifier and Type | Field and Description |
---|---|
static BulletException |
IMPROPER_EMIT |
static BulletException |
IMPROPER_EVERY |
static BulletException |
IMPROPER_INCLUDE |
static BulletException |
NO_RECORD_ALL |
Constructor and Description |
---|
Window(Integer emitEvery,
Window.Unit emitType)
Constructor that creates a window with only emit fields.
|
Window(Integer emitEvery,
Window.Unit emitType,
Window.Unit includeType,
Integer includeFirst)
Constructor that creates a window with emit and include fields.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(BulletConfig config)
Takes a
BulletConfig containing configuration and applies it to itself. |
Scheme |
getScheme(Strategy strategy,
BulletConfig config)
Returns the appropriate window scheme based on the Window
Window.Classification . |
Window.Classification |
getType()
Gets the classification of this window for the given emit and include types.
|
boolean |
isTimeBased()
Returns true if this is a time based window (emits based on time).
|
String |
toString() |
public static final BulletException IMPROPER_EMIT
public static final BulletException IMPROPER_EVERY
public static final BulletException IMPROPER_INCLUDE
public static final BulletException NO_RECORD_ALL
public Window(Integer emitEvery, Window.Unit emitType)
emitEvery
- The non-null emit every field.emitType
- The non-null emit unit type.public Window(Integer emitEvery, Window.Unit emitType, Window.Unit includeType, Integer includeFirst)
emitEvery
- The non-null emit every field.emitType
- The non-null emit unit type.includeType
- The non-null include unit type.includeFirst
- The include first field. Can be null if the include unit type is ALL.public void configure(BulletConfig config)
Configurable
BulletConfig
containing configuration and applies it to itself.configure
in interface Configurable
config
- The configuration containing the settings.public Scheme getScheme(Strategy strategy, BulletConfig config)
Window.Classification
.strategy
- The Strategy
to be passed on to the window scheme.config
- The BulletConfig
to be passed on to the window scheme.public Window.Classification getType()
Window.Classification
of this window.public boolean isTimeBased()
Copyright © 2021. All rights reserved.