1616 */
1717package io .openmessaging .api ;
1818
19- import java .time .Duration ;
2019import java .util .Collection ;
2120import java .util .List ;
2221import java .util .Set ;
@@ -65,13 +64,13 @@ interface TopicPartitionChangeListener {
6564 * Fetch data for the topics or partitions specified using assign API. It is an error to not have subscribed to any
6665 * topics or partitions before polling for data.
6766 *
68- * @param timeout
67+ * @param timeout in millisecond
6968 * @return
7069 */
71- List <Message > poll (Duration timeout );
70+ List <Message > poll (long timeout );
7271
7372 /**
74- * Overrides the fetch offsets that the consumer will use on the next {@link #poll(Duration )} }. If this API is invoked
73+ * Overrides the fetch offsets that the consumer will use on the next {@link #poll(long )} }. If this API is invoked
7574 * for the same message queue more than once, the latest offset will be used on the next poll(). Note that you may
7675 * lose data if this API is arbitrarily used in the middle of consumption.
7776 *
@@ -82,22 +81,22 @@ interface TopicPartitionChangeListener {
8281
8382 /**
8483 * Overrides the fetch offsets with the beginning offset in server that the consumer will use on the next {@link
85- * #poll(Duration )} }.
84+ * #poll(long )} }.
8685 *
8786 * @param topicPartition
8887 */
8988 void seekToBeginning (TopicPartition topicPartition );
9089
9190 /**
9291 * Overrides the fetch offsets with the end offset in server that the consumer will use on the next {@link
93- * #poll(Duration )} }.
92+ * #poll(long )} }.
9493 *
9594 * @param topicPartition
9695 */
9796 void seekToEnd (TopicPartition topicPartition );
9897
9998 /**
100- * Suspend fetching from the requested message queues. Future calls to {@link #poll(Duration )} will not return any
99+ * Suspend fetching from the requested message queues. Future calls to {@link #poll(long )} will not return any
101100 * records from these message queues until they have been resumed using {@link #resume(Collection)}.
102101 *
103102 * Note that this method does not affect message queue subscription. In particular, it does not cause a group
@@ -109,7 +108,7 @@ interface TopicPartitionChangeListener {
109108
110109 /**
111110 * Resume specified message queues which have been paused with {@link #pause(Collection)}. New calls to {@link
112- * #poll(Duration )} will return records from these partitions if there are any to be fetched. If the message queues were
111+ * #poll(long )} will return records from these partitions if there are any to be fetched. If the message queues were
113112 * not previously paused, this method is a no-op.
114113 *
115114 * @param topicPartitions
0 commit comments