Package org.elasticsearch
Class Version
java.lang.Object
org.elasticsearch.Version
- All Implemented Interfaces:
Comparable<Version>
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public class Version
extends Object
implements Comparable<Version>, org.elasticsearch.common.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionbyte
static Version
int
org.apache.lucene.util.Version
byte
byte
byte
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static Version
static int
Fields inherited from interface org.elasticsearch.common.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
isAlpha()
Returns true iff this version is an alpha version Note: This has been introduced in elasticsearch version 5.boolean
isBeta()
boolean
isCompatible(Version version)
Returnstrue
iff both version are compatible.boolean
isRC()
boolean
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)
static Version
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.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.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
V_EMPTY_ID
public static final int V_EMPTY_ID- See Also:
- Constant Field Values
-
V_EMPTY
-
V_6_0_0_alpha1
-
V_6_0_0_alpha2
-
V_6_0_0_beta1
-
V_6_0_0_beta2
-
V_6_0_0_rc1
-
V_6_0_0_rc2
-
V_6_0_0
-
V_6_0_1
-
V_6_1_0
-
V_6_1_1
-
V_6_1_2
-
V_6_1_3
-
V_6_1_4
-
V_6_2_0
-
V_6_2_1
-
V_6_2_2
-
V_6_2_3
-
V_6_2_4
-
V_6_3_0
-
V_6_3_1
-
V_6_3_2
-
V_6_4_0
-
V_6_4_1
-
V_6_4_2
-
V_6_4_3
-
V_6_5_0
-
V_6_5_1
-
V_6_5_2
-
V_6_5_3
-
V_6_5_4
-
V_6_6_0
-
V_6_6_1
-
V_6_6_2
-
V_6_7_0
-
V_6_7_1
-
V_6_7_2
-
V_6_8_0
-
V_6_8_1
-
V_6_8_2
-
V_6_8_3
-
V_6_8_4
-
V_6_8_5
-
V_6_8_6
-
V_6_8_7
-
V_6_8_8
-
V_6_8_9
-
V_6_8_10
-
V_6_8_11
-
V_6_8_12
-
V_6_8_13
-
V_6_8_14
-
V_6_8_15
-
V_6_8_16
-
V_6_8_17
-
V_6_8_18
-
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_13_5
-
V_7_14_0
-
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.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.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
-
main
-
toString
-
equals
-
hashCode
public int hashCode() -
isBeta
public boolean isBeta() -
isAlpha
public boolean isAlpha()Returns true iff this version is an alpha version Note: This has been introduced in elasticsearch version 5. Previous versions will never have an alpha version. -
isRC
public boolean isRC() -
isRelease
public boolean isRelease() -
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.
-