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 IndexVersionReturns a randomIndexVersionthat is compatible withIndexVersion.current()static IndexVersionReturns a randomIndexVersionthat is compatible withIndexVersion.current()and can be written tostatic IndexVersionReturns a randomIndexVersionthat is compatible with the previous version toversionstatic IndexVersionReturns 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(IndexVersion minVersion, IndexVersion maxVersion) static IndexVersionrandomVersionOnOrAfter(IndexVersion version) Returns a randomIndexVersiongreater than or equal toversionstatic 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(@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
Returns a randomIndexVersionthat is compatible with the previous version toversionand can be written to -
randomVersionOnOrAfter
Returns a randomIndexVersiongreater than or equal toversion
-