public interface OffsetManager
extends java.io.Closeable, java.io.Flushable
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOffset(Partition partition)
Removes the offset for a given
Partition. |
long |
getOffset(Partition partition)
Retrieves the offset for a given
Partition |
void |
resetOffsets(java.util.Collection<Partition> partition)
Resets offsets for the given
Partitions. |
void |
updateOffset(Partition partition,
long offset)
Updates the offset for a given
Partition |
void updateOffset(Partition partition, long offset)
Partitionpartition - the partition whose offset is to be updatedoffset - the new offset valuelong getOffset(Partition partition)
Partitionpartition - the partition to bevoid deleteOffset(Partition partition)
Partition. Useful
for components that need to clean up after themselves.partition - for which to delete the JavaDocvoid resetOffsets(java.util.Collection<Partition> partition)
Partitions. To be invoked when the values stored are invalid,
so a client cannot resume from that position. Implementations must decide on the best strategy to follow.partition - to reset