Package org.elasticsearch.test.index
Class IndexVersionUtils
java.lang.Object
org.elasticsearch.test.index.IndexVersionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NavigableSet<IndexVersion> Returns all released versionsstatic IndexVersionReturns the oldest knownIndexVersion.static IndexVersionReturns the oldest knownIndexVersionthat can be written tostatic IndexVersiongetNextVersion(IndexVersion version) static IndexVersiongetPreviousMajorVersion(IndexVersion version) static IndexVersionstatic IndexVersiongetPreviousVersion(IndexVersion version) static IndexVersionrandomCompatibleVersion(Random random) Returns a randomIndexVersionthat is compatible withIndexVersion.current()static IndexVersionrandomCompatibleWriteVersion(Random random) Returns a randomIndexVersionthat is compatible withIndexVersion.current()and can be written tostatic IndexVersionrandomPreviousCompatibleVersion(Random random, IndexVersion version) Returns a randomIndexVersionthat is compatible with the previous version toversionstatic IndexVersionrandomPreviousCompatibleWriteVersion(Random random, IndexVersion version) Returns a randomIndexVersionthat is compatible with the previous version toversionand can be written tostatic IndexVersionReturns a randomIndexVersionfrom all available versions.static IndexVersionrandomVersion(Set<IndexVersion> ignore) Returns a randomIndexVersionfrom all available versions without the ignore setstatic IndexVersionrandomVersionBetween(Random random, IndexVersion minVersion, IndexVersion maxVersion) static IndexVersionReturns a randomIndexVersionfrom all versions that can be written to.
-
Constructor Details
-
IndexVersionUtils
public IndexVersionUtils()
-
-
Method Details
-
allReleasedVersions
Returns all released versions -
getLowestReadCompatibleVersion
Returns the oldest knownIndexVersion. This version can only be read from and not written to -
getLowestWriteCompatibleVersion
Returns the oldest knownIndexVersionthat can be written to -
randomVersion
Returns a randomIndexVersionfrom all available versions. -
randomWriteVersion
Returns a randomIndexVersionfrom all versions that can be written to. -
randomVersion
Returns a randomIndexVersionfrom all available versions without the ignore set -
randomVersionBetween
public static IndexVersion randomVersionBetween(Random random, @Nullable IndexVersion minVersion, @Nullable IndexVersion maxVersion) -
getPreviousVersion
-
getPreviousVersion
-
getPreviousMajorVersion
-
getNextVersion
-
randomCompatibleVersion
Returns a randomIndexVersionthat is compatible withIndexVersion.current() -
randomCompatibleWriteVersion
Returns a randomIndexVersionthat is compatible withIndexVersion.current()and can be written to -
randomPreviousCompatibleVersion
Returns a randomIndexVersionthat is compatible with the previous version toversion -
randomPreviousCompatibleWriteVersion
public static IndexVersion randomPreviousCompatibleWriteVersion(Random random, IndexVersion version) Returns a randomIndexVersionthat is compatible with the previous version toversionand can be written to
-