@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
- IOException
public void storePosition(long position) throws IOException
storePosition
in interface PositionTracker
IOException
public long getPosition()
getPosition
in interface PositionTracker
public String getTarget()
getTarget
in interface PositionTracker
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PositionTracker
IOException
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.