@InterfaceAudience.Private @InterfaceStability.Evolving public class DurablePositionTracker extends Object implements PositionTracker
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static DurablePositionTracker |
getInstance(File trackerFile,
String target)
If the file exists at startup, then read it, roll it, and open a new one.
|
long |
getPosition() |
String |
getTarget() |
void |
storePosition(long position) |
public static DurablePositionTracker getInstance(File trackerFile, String target) throws IOException
trackerFile - target - IOExceptionpublic void storePosition(long position)
throws IOException
storePosition in interface PositionTrackerIOExceptionpublic long getPosition()
getPosition in interface PositionTrackerpublic String getTarget()
getTarget in interface PositionTrackerpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface PositionTrackerIOExceptionCopyright © 2009-2022 Apache Software Foundation. All Rights Reserved.