Package org.apache.storm.utils
Class VersionedStore
java.lang.Object
org.apache.storm.utils.VersionedStore
-
Constructor Summary
ConstructorDescriptionVersionedStore
(String path, boolean createRootDir) Creates a store at the given path. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
void
cleanup
(int versionsToKeep) createVersion
(long version) void
deleteVersion
(long version) void
failVersion
(String path) Sorted from most recent to oldest.getRoot()
mostRecentVersion
(long maxVersion) mostRecentVersionPath
(long maxVersion) void
succeedVersion
(String path) versionPath
(long version)
-
Constructor Details
-
VersionedStore
Creates a store at the given path.- Parameters:
path
- The path for the storecreateRootDir
- option to create the path directory- Throws:
IOException
-
-
Method Details
-
getRoot
-
versionPath
-
mostRecentVersionPath
- Throws:
IOException
-
mostRecentVersionPath
- Throws:
IOException
-
mostRecentVersion
- Throws:
IOException
-
mostRecentVersion
- Throws:
IOException
-
createVersion
- Throws:
IOException
-
createVersion
- Throws:
IOException
-
failVersion
- Throws:
IOException
-
deleteVersion
- Throws:
IOException
-
succeedVersion
- Throws:
IOException
-
cleanup
- Throws:
IOException
-
cleanup
- Throws:
IOException
-
getAllVersions
Sorted from most recent to oldest.- Throws:
IOException
-