backtype.storm.utils
Class VersionedStore

java.lang.Object
  extended by backtype.storm.utils.VersionedStore

public class VersionedStore
extends java.lang.Object


Constructor Summary
VersionedStore(java.lang.String path)
           
 
Method Summary
 void cleanup()
           
 void cleanup(int versionsToKeep)
           
 java.lang.String createVersion()
           
 java.lang.String createVersion(long version)
           
 void deleteVersion(long version)
           
 void failVersion(java.lang.String path)
           
 java.util.List<java.lang.Long> getAllVersions()
          Sorted from most recent to oldest
 java.lang.String getRoot()
           
 java.lang.Long mostRecentVersion()
           
 java.lang.Long mostRecentVersion(long maxVersion)
           
 java.lang.String mostRecentVersionPath()
           
 java.lang.String mostRecentVersionPath(long maxVersion)
           
 void succeedVersion(java.lang.String path)
           
 java.lang.String versionPath(long version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedStore

public VersionedStore(java.lang.String path)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getRoot

public java.lang.String getRoot()

versionPath

public java.lang.String versionPath(long version)

mostRecentVersionPath

public java.lang.String mostRecentVersionPath()
                                       throws java.io.IOException
Throws:
java.io.IOException

mostRecentVersionPath

public java.lang.String mostRecentVersionPath(long maxVersion)
                                       throws java.io.IOException
Throws:
java.io.IOException

mostRecentVersion

public java.lang.Long mostRecentVersion()
                                 throws java.io.IOException
Throws:
java.io.IOException

mostRecentVersion

public java.lang.Long mostRecentVersion(long maxVersion)
                                 throws java.io.IOException
Throws:
java.io.IOException

createVersion

public java.lang.String createVersion()
                               throws java.io.IOException
Throws:
java.io.IOException

createVersion

public java.lang.String createVersion(long version)
                               throws java.io.IOException
Throws:
java.io.IOException

failVersion

public void failVersion(java.lang.String path)
                 throws java.io.IOException
Throws:
java.io.IOException

deleteVersion

public void deleteVersion(long version)
                   throws java.io.IOException
Throws:
java.io.IOException

succeedVersion

public void succeedVersion(java.lang.String path)
                    throws java.io.IOException
Throws:
java.io.IOException

cleanup

public void cleanup()
             throws java.io.IOException
Throws:
java.io.IOException

cleanup

public void cleanup(int versionsToKeep)
             throws java.io.IOException
Throws:
java.io.IOException

getAllVersions

public java.util.List<java.lang.Long> getAllVersions()
                                              throws java.io.IOException
Sorted from most recent to oldest

Throws:
java.io.IOException