public interface OffsetHandler
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the offset handler, releasing all resources.
|
void |
commit(Map<org.apache.kafka.common.TopicPartition,Long> offsetsToCommit)
Commits the given offset for the partitions.
|
void |
seekFetcherToInitialOffsets(List<org.apache.kafka.common.TopicPartition> partitions,
Fetcher fetcher)
Positions the given fetcher to the initial read offsets where the stream consumption
will start from.
|
void commit(Map<org.apache.kafka.common.TopicPartition,Long> offsetsToCommit) throws Exception
offsetsToCommit - The offset to commit, per partition.Exceptionvoid seekFetcherToInitialOffsets(List<org.apache.kafka.common.TopicPartition> partitions, Fetcher fetcher) throws Exception
partitions - The partitions for which to seeks the fetcher to the beginning.fetcher - The fetcher that will pull data from Kafka and must be positioned.Exceptionvoid close()
throws IOException
IOException - Thrown, if the closing fails.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.