Class IndexVersionUtils

java.lang.Object
org.elasticsearch.test.index.IndexVersionUtils

public class IndexVersionUtils extends Object
  • Constructor Details

    • IndexVersionUtils

      public IndexVersionUtils()
  • Method Details

    • allReleasedVersions

      public static NavigableSet<IndexVersion> allReleasedVersions()
      Returns all released versions
    • getLowestReadCompatibleVersion

      public static IndexVersion getLowestReadCompatibleVersion()
      Returns the oldest known IndexVersion. This version can only be read from and not written to
    • getLowestWriteCompatibleVersion

      public static IndexVersion getLowestWriteCompatibleVersion()
      Returns the oldest known IndexVersion that can be written to
    • randomVersion

      public static IndexVersion randomVersion()
      Returns a random IndexVersion from all available versions.
    • randomWriteVersion

      public static IndexVersion randomWriteVersion()
      Returns a random IndexVersion from all versions that can be written to.
    • randomVersion

      public static IndexVersion randomVersion(Set<IndexVersion> ignore)
      Returns a random IndexVersion from all available versions without the ignore set
    • randomVersionBetween

      public static IndexVersion randomVersionBetween(Random random, @Nullable IndexVersion minVersion, @Nullable IndexVersion maxVersion)
      Returns a random IndexVersion between minVersion and maxVersion (inclusive).
    • getPreviousVersion

      public static IndexVersion getPreviousVersion()
    • getPreviousVersion

      public static IndexVersion getPreviousVersion(IndexVersion version)
    • getPreviousMajorVersion

      public static IndexVersion getPreviousMajorVersion(IndexVersion version)
    • getNextVersion

      public static IndexVersion getNextVersion(IndexVersion version)
    • randomCompatibleVersion

      public static IndexVersion randomCompatibleVersion(Random random)
      Returns a random IndexVersion that is compatible with IndexVersion.current()
    • randomCompatibleWriteVersion

      public static IndexVersion randomCompatibleWriteVersion(Random random)
      Returns a random IndexVersion that is compatible with IndexVersion.current() and can be written to
    • randomPreviousCompatibleVersion

      public static IndexVersion randomPreviousCompatibleVersion(Random random, IndexVersion version)
      Returns a random IndexVersion that is compatible with the previous version to version
    • randomPreviousCompatibleWriteVersion

      public static IndexVersion randomPreviousCompatibleWriteVersion(Random random, IndexVersion version)
      Returns a random IndexVersion that is compatible with the previous version to version and can be written to