T
- type of elements being windowedW
- BoundedWindow
subclass used to represent the windows used by this WindowingStrategy
@Internal public class WindowingStrategy<T,W extends BoundedWindow> extends java.lang.Object implements java.io.Serializable
WindowingStrategy
describes the windowing behavior for a specific collection of values.
It has both a WindowFn
describing how elements are assigned to windows and a Trigger
that controls when output is produced for each window.Modifier and Type | Class and Description |
---|---|
static class |
WindowingStrategy.AccumulationMode
The accumulation modes that can be used with windowing.
|
public static WindowingStrategy<java.lang.Object,GlobalWindow> globalDefault()
public static <T,W extends BoundedWindow> WindowingStrategy<T,W> of(WindowFn<T,W> windowFn)
public Trigger getTrigger()
public boolean isTriggerSpecified()
public Duration getAllowedLateness()
public boolean isAllowedLatenessSpecified()
public WindowingStrategy.AccumulationMode getMode()
public boolean isModeSpecified()
public boolean isAlreadyMerged()
public boolean needsMerge()
public Window.ClosingBehavior getClosingBehavior()
public Window.OnTimeBehavior getOnTimeBehavior()
public TimestampCombiner getTimestampCombiner()
public boolean isTimestampCombinerSpecified()
public java.lang.String getEnvironmentId()
public WindowingStrategy<T,W> withTrigger(Trigger trigger)
public WindowingStrategy<T,W> withMode(WindowingStrategy.AccumulationMode mode)
public WindowingStrategy<T,W> withWindowFn(WindowFn<?,?> wildcardWindowFn)
public WindowingStrategy<T,W> withAllowedLateness(Duration allowedLateness)
public WindowingStrategy<T,W> withClosingBehavior(Window.ClosingBehavior closingBehavior)
public WindowingStrategy<T,W> withOnTimeBehavior(Window.OnTimeBehavior onTimeBehavior)
public WindowingStrategy<T,W> withTimestampCombiner(TimestampCombiner timestampCombiner)
public WindowingStrategy<T,W> withEnvironmentId(java.lang.String environmentId)
public WindowingStrategy<T,W> withAlreadyMerged(boolean alreadyMerged)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public WindowingStrategy<T,W> fixDefaults()