Package org.apache.beam.sdk.values
Class WindowingStrategy<T,W extends BoundedWindow>
- java.lang.Object
-
- org.apache.beam.sdk.values.WindowingStrategy<T,W>
-
- Type Parameters:
T
- type of elements being windowedW
-BoundedWindow
subclass used to represent the windows used by thisWindowingStrategy
- All Implemented Interfaces:
java.io.Serializable
@Internal public class WindowingStrategy<T,W extends BoundedWindow> extends java.lang.Object implements java.io.Serializable
AWindowingStrategy
describes the windowing behavior for a specific collection of values. It has both aWindowFn
describing how elements are assigned to windows and aTrigger
that controls when output is produced for each window.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WindowingStrategy.AccumulationMode
The accumulation modes that can be used with windowing.
-
Method Summary
-
-
-
Method Detail
-
globalDefault
public static WindowingStrategy<java.lang.Object,GlobalWindow> globalDefault()
Return a fully specified, default windowing strategy.
-
of
public static <T,W extends BoundedWindow> WindowingStrategy<T,W> of(WindowFn<T,W> windowFn)
-
getTrigger
public Trigger getTrigger()
-
isTriggerSpecified
public boolean isTriggerSpecified()
-
getAllowedLateness
public org.joda.time.Duration getAllowedLateness()
-
isAllowedLatenessSpecified
public boolean isAllowedLatenessSpecified()
-
getMode
public WindowingStrategy.AccumulationMode getMode()
-
isModeSpecified
public boolean isModeSpecified()
-
isAlreadyMerged
public boolean isAlreadyMerged()
-
needsMerge
public boolean needsMerge()
-
getClosingBehavior
public Window.ClosingBehavior getClosingBehavior()
-
getOnTimeBehavior
public Window.OnTimeBehavior getOnTimeBehavior()
-
getTimestampCombiner
public TimestampCombiner getTimestampCombiner()
-
isTimestampCombinerSpecified
public boolean isTimestampCombinerSpecified()
-
getEnvironmentId
public java.lang.String getEnvironmentId()
-
withTrigger
public WindowingStrategy<T,W> withTrigger(Trigger trigger)
-
withMode
public WindowingStrategy<T,W> withMode(WindowingStrategy.AccumulationMode mode)
-
withWindowFn
public WindowingStrategy<T,W> withWindowFn(WindowFn<?,?> wildcardWindowFn)
-
withAllowedLateness
public WindowingStrategy<T,W> withAllowedLateness(org.joda.time.Duration allowedLateness)
-
withClosingBehavior
public WindowingStrategy<T,W> withClosingBehavior(Window.ClosingBehavior closingBehavior)
-
withOnTimeBehavior
public WindowingStrategy<T,W> withOnTimeBehavior(Window.OnTimeBehavior onTimeBehavior)
-
withTimestampCombiner
@Experimental(OUTPUT_TIME) public WindowingStrategy<T,W> withTimestampCombiner(TimestampCombiner timestampCombiner)
-
withEnvironmentId
public WindowingStrategy<T,W> withEnvironmentId(java.lang.String environmentId)
-
withAlreadyMerged
public WindowingStrategy<T,W> withAlreadyMerged(boolean alreadyMerged)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
fixDefaults
public WindowingStrategy<T,W> fixDefaults()
Fixes all the defaults so that equals can be used to check that two strategies are the same, regardless of the state of "defaulted-ness".
-
-