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
Creates a store at the given path.
The - path for the storecreateRootDir - option to create the path directoryIOExceptionpublic String getRoot()
public String versionPath(long version)
public String mostRecentVersionPath() throws IOException
IOExceptionpublic String mostRecentVersionPath(long maxVersion) throws IOException
IOExceptionpublic Long mostRecentVersion() throws IOException
IOExceptionpublic Long mostRecentVersion(long maxVersion) throws IOException
IOExceptionpublic String createVersion() throws IOException
IOExceptionpublic String createVersion(long version) throws IOException
IOExceptionpublic void failVersion(String path) throws IOException
IOExceptionpublic void deleteVersion(long version)
throws IOException
IOExceptionpublic void succeedVersion(String path) throws IOException
IOExceptionpublic void cleanup()
throws IOException
IOExceptionpublic void cleanup(int versionsToKeep)
throws IOException
IOExceptionpublic List<Long> getAllVersions() throws IOException
Sorted from most recent to oldest.
IOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.