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 IndexVersion
Returns the oldest knownIndexVersion
.static IndexVersion
Returns the oldest knownIndexVersion
that can be written tostatic IndexVersion
getNextVersion
(IndexVersion version) static IndexVersion
getPreviousMajorVersion
(IndexVersion version) static IndexVersion
static IndexVersion
getPreviousVersion
(IndexVersion version) static IndexVersion
randomCompatibleVersion
(Random random) Returns a randomIndexVersion
that is compatible withIndexVersion.current()
static IndexVersion
randomCompatibleWriteVersion
(Random random) Returns a randomIndexVersion
that is compatible withIndexVersion.current()
and can be written tostatic IndexVersion
randomPreviousCompatibleVersion
(Random random, IndexVersion version) Returns a randomIndexVersion
that is compatible with the previous version toversion
static IndexVersion
randomPreviousCompatibleWriteVersion
(Random random, IndexVersion version) Returns a randomIndexVersion
that is compatible with the previous version toversion
and can be written tostatic IndexVersion
Returns a randomIndexVersion
from all available versions.static IndexVersion
randomVersion
(Set<IndexVersion> ignore) Returns a randomIndexVersion
from all available versions without the ignore setstatic IndexVersion
randomVersionBetween
(Random random, IndexVersion minVersion, IndexVersion maxVersion) static IndexVersion
Returns a randomIndexVersion
from 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 knownIndexVersion
that can be written to -
randomVersion
Returns a randomIndexVersion
from all available versions. -
randomWriteVersion
Returns a randomIndexVersion
from all versions that can be written to. -
randomVersion
Returns a randomIndexVersion
from 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 randomIndexVersion
that is compatible withIndexVersion.current()
-
randomCompatibleWriteVersion
Returns a randomIndexVersion
that is compatible withIndexVersion.current()
and can be written to -
randomPreviousCompatibleVersion
Returns a randomIndexVersion
that is compatible with the previous version toversion
-
randomPreviousCompatibleWriteVersion
public static IndexVersion randomPreviousCompatibleWriteVersion(Random random, IndexVersion version) Returns a randomIndexVersion
that is compatible with the previous version toversion
and can be written to
-