public static final class SliceAssigners.TumblingSliceAssigner extends Object implements SliceUnsharedAssigner
SliceAssigner
for tumbling windows.Modifier and Type | Method and Description |
---|---|
long |
assignSliceEnd(long timestamp) |
Iterable<Long> |
expiredSlices(long windowEnd)
Returns an iterator of slices to expire when the given window is emitted.
|
long |
getLastWindowEnd(long sliceEnd)
Returns the last window which the slice belongs to.
|
long |
getSliceEndInterval()
Returns the interval of slice ends, i.e.
|
long |
getWindowStart(long windowEnd)
Returns the corresponding window start timestamp of the given window end timestamp.
|
SliceAssigners.TumblingSliceAssigner |
withOffset(java.time.Duration offset)
Creates a new
SliceAssigners.TumblingSliceAssigner with a new specified offset. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assignSliceEnd, isEventTime
public SliceAssigners.TumblingSliceAssigner withOffset(java.time.Duration offset)
SliceAssigners.TumblingSliceAssigner
with a new specified offset.public long assignSliceEnd(long timestamp)
public long getLastWindowEnd(long sliceEnd)
SliceAssigner
getLastWindowEnd
in interface SliceAssigner
public long getWindowStart(long windowEnd)
SliceAssigner
getWindowStart
in interface SliceAssigner
public Iterable<Long> expiredSlices(long windowEnd)
SliceAssigner
expiredSlices
in interface SliceAssigner
windowEnd
- the end timestamp of window emitted.public long getSliceEndInterval()
SliceAssigner
getSliceEndInterval
in interface SliceAssigner
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.