org.apache.storm.utils

## Class VersionedStore

- java.lang.Object
- - org.apache.storm.utils.VersionedStore

-     public class VersionedStore
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VersionedStore(String path, boolean createRootDir)` Creates a store at the given path.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VersionedStore

          public VersionedStore(String path,
                                boolean createRootDir)
                         throws IOException

      Creates a store at the given path.

      Parameters:
        `The` - path for the store
        `createRootDir` - option to create the path directory
      Throws:
        `IOException`

  - ### Method Detail

    - #### getRoot

          public String getRoot()

    - #### versionPath

          public String versionPath(long version)

    - #### mostRecentVersionPath

          public String mostRecentVersionPath()
                                       throws IOException

      Throws:
        `IOException`

    - #### mostRecentVersionPath

          public String mostRecentVersionPath(long maxVersion)
                                       throws IOException

      Throws:
        `IOException`

    - #### mostRecentVersion

          public Long mostRecentVersion()
                                 throws IOException

      Throws:
        `IOException`

    - #### mostRecentVersion

          public Long mostRecentVersion(long maxVersion)
                                 throws IOException

      Throws:
        `IOException`

    - #### createVersion

          public String createVersion()
                               throws IOException

      Throws:
        `IOException`

    - #### createVersion

          public String createVersion(long version)
                               throws IOException

      Throws:
        `IOException`

    - #### failVersion

          public void failVersion(String path)
                           throws IOException

      Throws:
        `IOException`

    - #### deleteVersion

          public void deleteVersion(long version)
                             throws IOException

      Throws:
        `IOException`

    - #### succeedVersion

          public void succeedVersion(String path)
                              throws IOException

      Throws:
        `IOException`

    - #### cleanup

          public void cleanup()
                       throws IOException

      Throws:
        `IOException`

    - #### cleanup

          public void cleanup(int versionsToKeep)
                       throws IOException

      Throws:
        `IOException`

    - #### getAllVersions

          public List<Long> getAllVersions()
                                    throws IOException

      Sorted from most recent to oldest.

      Throws:
        `IOException`

Copyright © 2021 The Apache Software Foundation. All rights reserved.