public final class UnlimitedWindows extends Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
An unlimited time window is also called landmark window. It has a fixed starting point while its window end is defined as infinite. With this regard, it is a fixed-size window with infinite window size.
For time semantics, see TimestampExtractor
.
Modifier and Type | Field and Description |
---|---|
long |
startMs
The start timestamp of the window.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
long |
gracePeriodMs()
Return the window grace period (the time to admit
late-arriving events after the end of the window.)
Lateness is defined as (stream_time - record_timestamp).
|
int |
hashCode() |
long |
maintainMs()
Deprecated.
since 2.1. Use
Materialized.retention instead. |
static UnlimitedWindows |
of()
Return an unlimited window starting at timestamp zero.
|
long |
size()
Return the size of the specified windows in milliseconds.
|
UnlimitedWindows |
startOn(java.time.Instant start)
Return a new unlimited window for the specified start timestamp.
|
UnlimitedWindows |
startOn(long startMs)
Deprecated.
Use
startOn(Instant) instead |
java.lang.String |
toString() |
UnlimitedWindows |
until(long durationMs)
Deprecated.
since 2.1.
|
java.util.Map<java.lang.Long,org.apache.kafka.streams.kstream.internals.UnlimitedWindow> |
windowsFor(long timestamp)
Create all windows that contain the provided timestamp, indexed by non-negative window start timestamps.
|
public static UnlimitedWindows of()
@Deprecated public UnlimitedWindows startOn(long startMs) throws java.lang.IllegalArgumentException
startOn(Instant)
insteadstartMs
- the window start timestartMs
java.lang.IllegalArgumentException
- if the start time is negativepublic UnlimitedWindows startOn(java.time.Instant start) throws java.lang.IllegalArgumentException
start
- the window start timestart
java.lang.IllegalArgumentException
- if the start time is negative or can't be represented as long milliseconds
public java.util.Map<java.lang.Long,org.apache.kafka.streams.kstream.internals.UnlimitedWindow> windowsFor(long timestamp)
Windows
windowsFor
in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
timestamp
- the timestamp window should get created forwindowStartTimestamp -> Window
entriespublic long size()
Long.MAX_VALUE
.@Deprecated public UnlimitedWindows until(long durationMs)
IllegalArgumentException
because the retention time for unlimited windows is always infinite
and cannot be changed.@Deprecated public long maintainMs()
Materialized.retention
instead.Long.MAX_VALUE
.maintainMs
in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
Long.MAX_VALUE
public long gracePeriodMs()
Windows
gracePeriodMs
in class Windows<org.apache.kafka.streams.kstream.internals.UnlimitedWindow>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object