Wiki
dev/common
Generated page
Model gemma-mtp, commit f508a4b65b3f, 2026-08-16, sources: 2. Edit the code or the hand-written documentation instead.
Diagram
FileOffsetStore
The primary implementation of the OffsetStore interface using the local filesystem, as seen in FileOffsetStore.kt:27.
More: FileOffsetStore
Atomic offset persistence
The mechanism of writing offsets via temporary files and atomic moves to prevent data corruption, implemented in FileOffsetStore.kt:55-57.
More: Atomic offset persistence
load and save operations
The lifecycle of reading and writing offsets for a specific TopicName and PartitionId, handled by the load and save methods in FileOffsetStore.kt:34-58.
Key files
| File | Lines | What is there |
|---|---|---|
…/common/FileOffsetStore.kt | 27-64 | The implementation of the FileOffsetStore class and its file-based logic. |
Public API
| What | Where | Why |
|---|---|---|
FileOffsetStore | FileOffsetStore.kt:27 | Provides a filesystem-based implementation of the OffsetStore interface. |
Behaviour that surprise
saveuses a temporary file and an atomic move (FileOffsetStore.kt:55-57) to ensure that a partially written offset does not corrupt the state.loadreturnsnullif the offset file does not exist on the disk (FileOffsetStore.kt:40).