Package org.elasticsearch
Class Version
java.lang.Object
org.elasticsearch.Version
- All Implemented Interfaces:
Comparable<Version>
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public class Version
extends Object
implements Comparable<Version>, org.elasticsearch.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionfinal byte
static final Version
final int
final org.apache.lucene.util.Version
final byte
final byte
final byte
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final Version
static final int
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
int
boolean
static Version
fromId
(int id) static Version
fromString
(String version) Returns the version given its string representation, current version if the argument is null or emptygetDeclaredVersions
(Class<?> versionClass) Extracts a sorted list of declared version constants from a class.int
hashCode()
boolean
isCompatible
(Version version) Returnstrue
iff both version are compatible.static void
static Version
Returns the maximum version between the 2static Version
Returns the minimum version between the 2.Returns the minimum compatible version based on the current version.Returns the minimum created index version that this version supports.boolean
boolean
onOrBefore
(Version version) Returns a first major version previous to the version stored in this object.static Version
toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static void
writeVersion
(Version version, StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
V_EMPTY_ID
public static final int V_EMPTY_ID- See Also:
-
V_EMPTY
-
V_7_0_0
-
V_7_0_1
-
V_7_1_0
-
V_7_1_1
-
V_7_2_0
-
V_7_2_1
-
V_7_3_0
-
V_7_3_1
-
V_7_3_2
-
V_7_4_0
-
V_7_4_1
-
V_7_4_2
-
V_7_5_0
-
V_7_5_1
-
V_7_5_2
-
V_7_6_0
-
V_7_6_1
-
V_7_6_2
-
V_7_7_0
-
V_7_7_1
-
V_7_8_0
-
V_7_8_1
-
V_7_9_0
-
V_7_9_1
-
V_7_9_2
-
V_7_9_3
-
V_7_10_0
-
V_7_10_1
-
V_7_10_2
-
V_7_11_0
-
V_7_11_1
-
V_7_11_2
-
V_7_12_0
-
V_7_12_1
-
V_7_13_0
-
V_7_13_1
-
V_7_13_2
-
V_7_13_3
-
V_7_13_4
-
V_7_14_0
-
V_7_14_1
-
V_7_14_2
-
V_7_15_0
-
V_7_15_1
-
V_7_15_2
-
V_7_16_0
-
V_7_16_1
-
V_7_16_2
-
V_7_16_3
-
V_7_17_0
-
V_7_17_1
-
V_7_17_2
-
V_8_0_0
-
V_8_0_1
-
V_8_1_0
-
V_8_1_1
-
V_8_1_2
-
CURRENT
-
id
public final int id -
major
public final byte major -
minor
public final byte minor -
revision
public final byte revision -
build
public final byte build -
luceneVersion
public final org.apache.lucene.util.Version luceneVersion
-
-
Method Details
-
readVersion
- Throws:
IOException
-
fromId
-
writeVersion
- Throws:
IOException
-
min
Returns the minimum version between the 2. -
max
Returns the maximum version between the 2 -
fromString
Returns the version given its string representation, current version if the argument is null or empty -
after
-
onOrAfter
-
before
-
onOrBefore
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Version>
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
minimumCompatibilityVersion
Returns the minimum compatible version based on the current version. Ie a node needs to have at least the return version in order to communicate with a node running the current version. The returned version is in most of the cases the smallest major version release unless the current version is a beta or RC release then the version itself is returned. -
minimumIndexCompatibilityVersion
Returns the minimum created index version that this version supports. Indices created with lower versions can't be used with this version. This should also be used for file based serialization backwards compatibility ie. on serialization code that is used to read / write file formats like transaction logs, cluster state, and index metadata. -
isCompatible
Returnstrue
iff both version are compatible. Otherwisefalse
-
previousMajor
Returns a first major version previous to the version stored in this object. I.e 8.1.0 will return 7.0.0 -
main
-
toString
-
equals
-
hashCode
public int hashCode() -
getDeclaredVersions
Extracts a sorted list of declared version constants from a class. The argument would normally be Version.class but is exposed for testing with other classes-containing-version-constants.
-