/** * A time duration based window that slides with every incoming tuple. * * @param windowLength the time duration of the window */ public BaseWindowedBolt withWindow(Duration windowLength) { return withWindowLength(windowLength).withSlidingInterval(new Count(1)); }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withTimestampField(String fieldName) { super.withTimestampField(fieldName); return this; }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withTumblingWindow(Duration duration) { super.withTumblingWindow(duration); return this; }
/** * Returns a {@link Duration} corresponding to the the given value in seconds. * * @param seconds the number of seconds * @return the Duration */ public static Duration seconds(int seconds) { return new Duration(seconds, TimeUnit.SECONDS); }
/** * Tuple count based sliding window configuration. * * @param windowLength the number of tuples in the window * @param slidingInterval the number of tuples after which the window slides */ public BaseWindowedBolt withWindow(Count windowLength, Count slidingInterval) { return withWindowLength(windowLength).withSlidingInterval(slidingInterval); }
/** * Returns a {@link Count} of given value. * * @param value the count value * @return the Count */ public static Count of(int value) { return new Count(value); }
@Override public void ack(Object msgId) { super.ack(msgId); } }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withWindow(Count windowLength, Count slidingInterval) { super.withWindow(windowLength, slidingInterval); return this; }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withLateTupleStream(String streamName) { super.withLateTupleStream(streamName); return this; }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withWatermarkInterval(Duration interval) { super.withWatermarkInterval(interval); return this; }
/** * A tuple count based window that slides with every incoming tuple. * * @param windowLength the number of tuples in the window */ public BaseWindowedBolt withWindow(Count windowLength) { return withWindowLength(windowLength).withSlidingInterval(new Count(1)); }
/** * Returns a {@link Duration} corresponding to the the given value in milli seconds. * * @param milliseconds the duration in milliseconds * @return the Duration */ public static Duration of(int milliseconds) { return new Duration(milliseconds, TimeUnit.MILLISECONDS); }
/** * Tuple count and time duration based sliding window configuration. * * @param windowLength the number of tuples in the window * @param slidingInterval the time duration after which the window slides */ public BaseWindowedBolt withWindow(Count windowLength, Duration slidingInterval) { return withWindowLength(windowLength).withSlidingInterval(slidingInterval); }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withTumblingWindow(Count count) { super.withTumblingWindow(count); return this; }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withWindow(Count windowLength, Duration slidingInterval) { super.withWindow(windowLength, slidingInterval); return this; }
/** * Returns a {@link Duration} corresponding to the the given value in days. * * @param days the number of days * @return the Duration */ public static Duration days(int days) { return new Duration(days, TimeUnit.DAYS); }
/** * A count based tumbling window. * * @param count the number of tuples after which the window tumbles */ public BaseWindowedBolt withTumblingWindow(Count count) { return withWindowLength(count).withSlidingInterval(count); }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withWindow(Duration windowLength, Duration slidingInterval) { super.withWindow(windowLength, slidingInterval); return this; }
/** * Returns a {@link Duration} corresponding to the the given value in minutes. * * @param minutes the number of minutes * @return the Duration */ public static Duration minutes(int minutes) { return new Duration(minutes, TimeUnit.MINUTES); }
/** * {@inheritDoc} */ @Override public BaseStatefulWindowedBolt<T> withWindow(Duration windowLength, Count slidingInterval) { super.withWindow(windowLength, slidingInterval); return this; }