From d8452ff0774b9444e86eabcaf03c4cd31ec5cc64 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Mon, 22 Jun 2020 11:19:01 -0400 Subject: [PATCH] GH-1517: ConsumerSeekCallback Javadoc Polishing Resolves https://github.com/spring-projects/spring-kafka/issues/1517 GH-1517: More Javadoc Polishing Unsaved local changes. --- .../kafka/listener/ConsumerSeekAware.java | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerSeekAware.java b/spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerSeekAware.java index f89cedc7..e42245c5 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerSeekAware.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerSeekAware.java @@ -60,8 +60,13 @@ public interface ConsumerSeekAware { interface ConsumerSeekCallback { /** - * Queue a seek operation to the consumer. The seek will occur after any pending - * offset commits. The consumer must be currently assigned the specified partition. + * Perform a seek operation. When called from + * {@link ConsumerSeekAware#onPartitionsAssigned(Map, ConsumerSeekCallback)} or + * from {@link ConsumerSeekAware#onIdleContainer(Map, ConsumerSeekCallback)} + * perform the seek immediately on the consumer. When called from elsewhere, + * queue the seek operation to the consumer. The queued seek will occur after any + * pending offset commits. The consumer must be currently assigned the specified + * partition. * @param topic the topic. * @param partition the partition. * @param offset the offset (absolute). @@ -69,7 +74,11 @@ public interface ConsumerSeekAware { void seek(String topic, int partition, long offset); /** - * Queue a seekToBeginning operation to the consumer. The seek will occur after + * Perform a seek to beginning operation. When called from + * {@link ConsumerSeekAware#onPartitionsAssigned(Map, ConsumerSeekCallback)} or + * from {@link ConsumerSeekAware#onIdleContainer(Map, ConsumerSeekCallback)} + * perform the seek immediately on the consumer. When called from elsewhere, queue + * the seek operation to the consumer. The queued seek will occur after * any pending offset commits. The consumer must be currently assigned the * specified partition. * @param topic the topic. @@ -78,8 +87,13 @@ public interface ConsumerSeekAware { void seekToBeginning(String topic, int partition); /** - * Queue a seekToEnd operation to the consumer. The seek will occur after any pending - * offset commits. The consumer must be currently assigned the specified partition. + * Perform a seek to end operation. When called from + * {@link ConsumerSeekAware#onPartitionsAssigned(Map, ConsumerSeekCallback)} or + * from {@link ConsumerSeekAware#onIdleContainer(Map, ConsumerSeekCallback)} + * perform the seek immediately on the consumer. When called from elsewhere, queue + * the seek operation to the consumer. The queued seek will occur after any + * pending offset commits. The consumer must be currently assigned the specified + * partition. * @param topic the topic. * @param partition the partition. */