Enum IndexFormatVersion
- java.lang.Object
-
- java.lang.Enum<IndexFormatVersion>
-
- org.apache.jackrabbit.oak.plugins.index.lucene.IndexFormatVersion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IndexFormatVersion>
public enum IndexFormatVersion extends java.lang.Enum<IndexFormatVersion>
The version of an index (property "compatVersion"). The default is version 2. Version 1 is supported for backward compatibility.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IndexFormatVersion
getDefault()
int
getVersion()
static IndexFormatVersion
getVersion(int version)
boolean
isAtLeast(IndexFormatVersion version)
Returnstrue
if this version is at least as high as the givenversion
.static IndexFormatVersion
max(IndexFormatVersion o1, IndexFormatVersion o2)
static IndexFormatVersion
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static IndexFormatVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
V1
public static final IndexFormatVersion V1
Index confirming to Oak version upto 1.0.8
-
V2
public static final IndexFormatVersion V2
Index confirming to Oak version upto 1.0.9
-
-
Method Detail
-
values
public static IndexFormatVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IndexFormatVersion c : IndexFormatVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IndexFormatVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isAtLeast
public boolean isAtLeast(IndexFormatVersion version)
Returnstrue
if this version is at least as high as the givenversion
.- Parameters:
version
- the other version to compare.- Returns:
true
if this version is at least as high as the provided;false
otherwise.
-
getVersion
public int getVersion()
-
getVersion
public static IndexFormatVersion getVersion(int version)
-
getDefault
public static IndexFormatVersion getDefault()
-
max
public static IndexFormatVersion max(IndexFormatVersion o1, IndexFormatVersion o2)
-
-