Class ListOffsetsApplicationEvent
java.lang.Object
org.apache.kafka.clients.consumer.internals.events.ApplicationEvent
org.apache.kafka.clients.consumer.internals.events.CompletableApplicationEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
org.apache.kafka.clients.consumer.internals.events.ListOffsetsApplicationEvent
- All Implemented Interfaces:
CompletableEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
public class ListOffsetsApplicationEvent
extends CompletableApplicationEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
Event for retrieving partition offsets by performing a
ListOffsetsRequest.
This event is created with a map of TopicPartition and target timestamps to search
offsets for. It is completed with the map of TopicPartition and
OffsetAndTimestamp found (offset of the first message whose timestamp is greater than
or equals to the target timestamp)-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.kafka.clients.consumer.internals.events.ApplicationEvent
ApplicationEvent.Type -
Constructor Summary
ConstructorsConstructorDescriptionListOffsetsApplicationEvent(Map<org.apache.kafka.common.TopicPartition, Long> timestampToSearch, boolean requireTimestamps) -
Method Summary
Modifier and TypeMethodDescriptionMap<org.apache.kafka.common.TopicPartition, OffsetAndTimestamp> Build result representing that no offsets were found as part of the current event.booleaninthashCode()booleantoString()Methods inherited from class org.apache.kafka.clients.consumer.internals.events.CompletableApplicationEvent
chain, future, get, toStringBaseMethods inherited from class org.apache.kafka.clients.consumer.internals.events.ApplicationEvent
type
-
Constructor Details
-
ListOffsetsApplicationEvent
-
-
Method Details
-
emptyResult
Build result representing that no offsets were found as part of the current event.- Returns:
- Map containing all the partitions the event was trying to get offsets for, and
null
OffsetAndTimestampas value
-
timestampsToSearch
-
requireTimestamps
public boolean requireTimestamps() -
equals
- Overrides:
equalsin classCompletableApplicationEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
-
hashCode
public int hashCode()- Overrides:
hashCodein classCompletableApplicationEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
-
toString
- Overrides:
toStringin classCompletableApplicationEvent<Map<org.apache.kafka.common.TopicPartition,OffsetAndTimestamp>>
-