Class NoPositionStore
java.lang.Object
com.arpnetworking.metrics.common.tailer.NoPositionStore
- All Implemented Interfaces:
PositionStore
,Closeable
,AutoCloseable
A
PositionStore
that always returns absent.- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot io)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getPosition
(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.
-
Constructor Details
-
NoPositionStore
public NoPositionStore()
-
-
Method Details
-
getPosition
Description copied from interface:PositionStore
Get the read location in the file identified by a hash.- Specified by:
getPosition
in interfacePositionStore
- Parameters:
identifier
- unique identifier for the file.- Returns:
- Optional.absent if the file was not found, otherwise a byte offset
-
setPosition
Description copied from interface:PositionStore
Update the read offset from the beginning of the file for the specified file identifier.- Specified by:
setPosition
in interfacePositionStore
- Parameters:
identifier
- unique identifier for the file.position
- the new read offset from the beginning of the file in bytes.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-