Package org.apache.kafka.streams
Class AutoOffsetReset
java.lang.Object
org.apache.kafka.streams.AutoOffsetReset
Sets the
auto.offset.reset
configuration when
adding a source processor
or when creating KStream
or KTable
via StreamsBuilder
.-
Method Summary
Modifier and TypeMethodDescriptionstatic AutoOffsetReset
byDuration
(Duration duration) Creates anAutoOffsetReset
instance for the specified reset duration.static AutoOffsetReset
earliest()
Creates anAutoOffsetReset
instance representing "earliest".boolean
int
hashCode()
static AutoOffsetReset
latest()
Creates anAutoOffsetReset
instance representing "latest".static AutoOffsetReset
none()
Creates anAutoOffsetReset
instance representing "none".
-
Method Details
-
none
Creates anAutoOffsetReset
instance representing "none".- Returns:
- An
AutoOffsetReset
instance for no reset.
-
earliest
Creates anAutoOffsetReset
instance representing "earliest".- Returns:
- An
AutoOffsetReset
instance for the "earliest" offset.
-
latest
Creates anAutoOffsetReset
instance representing "latest".- Returns:
- An
AutoOffsetReset
instance for the "latest" offset.
-
byDuration
Creates anAutoOffsetReset
instance for the specified reset duration.- Parameters:
duration
- The duration to use for the offset reset; must be non-negative.- Returns:
- An
AutoOffsetReset
instance with the specified duration. - Throws:
IllegalArgumentException
- If the duration is negative.
-
equals
-
hashCode
public int hashCode()
-