public class VersionedStore extends Object
Constructor and Description |
---|
VersionedStore(String path,
boolean createRootDir)
Creates a store at the given path.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
cleanup(int versionsToKeep) |
String |
createVersion() |
String |
createVersion(long version) |
void |
deleteVersion(long version) |
void |
failVersion(String path) |
List<Long> |
getAllVersions()
Sorted from most recent to oldest.
|
String |
getRoot() |
Long |
mostRecentVersion() |
Long |
mostRecentVersion(long maxVersion) |
String |
mostRecentVersionPath() |
String |
mostRecentVersionPath(long maxVersion) |
void |
succeedVersion(String path) |
String |
versionPath(long version) |
public VersionedStore(String path, boolean createRootDir) throws IOException
The
- path for the storecreateRootDir
- option to create the path directoryIOException
public String getRoot()
public String versionPath(long version)
public String mostRecentVersionPath() throws IOException
IOException
public String mostRecentVersionPath(long maxVersion) throws IOException
IOException
public Long mostRecentVersion() throws IOException
IOException
public Long mostRecentVersion(long maxVersion) throws IOException
IOException
public String createVersion() throws IOException
IOException
public String createVersion(long version) throws IOException
IOException
public void failVersion(String path) throws IOException
IOException
public void deleteVersion(long version) throws IOException
IOException
public void succeedVersion(String path) throws IOException
IOException
public void cleanup() throws IOException
IOException
public void cleanup(int versionsToKeep) throws IOException
IOException
public List<Long> getAllVersions() throws IOException
IOException
Copyright © 2023 The Apache Software Foundation. All rights reserved.