Interface PositionStore
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
FilePositionStore
,NoPositionStore
Interface to storage for tracking the read position in a file.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot io)
-
Method Summary
Modifier and TypeMethodDescriptiongetPosition
(String identifier) Get the read location in the file identified by a hash.void
setPosition
(String identifier, long position) Update the read offset from the beginning of the file for the specified file identifier.
-
Method Details
-
getPosition
Get the read location in the file identified by a hash.- Parameters:
identifier
- unique identifier for the file.- Returns:
- Optional.absent if the file was not found, otherwise a byte offset
-
setPosition
Update the read offset from the beginning of the file for the specified file identifier.- Parameters:
identifier
- unique identifier for the file.position
- the new read offset from the beginning of the file in bytes.
-