public interface OffsetHandler
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the offset handler, releasing all resources.
|
void |
commit(Map<KafkaTopicPartition,Long> offsetsToCommit)
Commits the given offset for the partitions.
|
Map<KafkaTopicPartition,Long> |
getOffsets(List<KafkaTopicPartition> partitions)
Positions the given fetcher to the initial read offsets where the stream consumption
will start from.
|
void commit(Map<KafkaTopicPartition,Long> offsetsToCommit) throws Exception
offsetsToCommit
- The offset to commit, per partition.Exception
Map<KafkaTopicPartition,Long> getOffsets(List<KafkaTopicPartition> partitions) throws Exception
partitions
- The partitions for which to seeks the fetcher to the beginning.Exception
void close() throws IOException
IOException
- Thrown, if the closing fails.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.