Package org.apache.lucene.index
Class IndexFormatTooOldException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.apache.lucene.index.IndexFormatTooOldException
-
- All Implemented Interfaces:
java.io.Serializable
public class IndexFormatTooOldException extends java.io.IOException
This exception is thrown when Lucene detects an index that is too old for this Lucene version- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
maxVersion
private java.lang.Integer
minVersion
private java.lang.String
reason
private java.lang.String
resourceDescription
private java.lang.Integer
version
-
Constructor Summary
Constructors Constructor Description IndexFormatTooOldException(java.lang.String resourceDescription, int version, int minVersion, int maxVersion)
Creates anIndexFormatTooOldException
.IndexFormatTooOldException(java.lang.String resourceDescription, java.lang.String reason)
Creates anIndexFormatTooOldException
.IndexFormatTooOldException(DataInput in, int version, int minVersion, int maxVersion)
Creates anIndexFormatTooOldException
.IndexFormatTooOldException(DataInput in, java.lang.String reason)
Creates anIndexFormatTooOldException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getMaxVersion()
Returns the maximum version accepted.java.lang.Integer
getMinVersion()
Returns the minimum version accepted This method will returnnull
if an alternativegetReason()
is provided.java.lang.String
getReason()
Returns an optional reason for this exception if the version information was not available.java.lang.String
getResourceDescription()
Returns a description of the file that was too oldjava.lang.Integer
getVersion()
Returns the version of the file that was too old.
-
-
-
Constructor Detail
-
IndexFormatTooOldException
public IndexFormatTooOldException(java.lang.String resourceDescription, java.lang.String reason)
Creates anIndexFormatTooOldException
.- Parameters:
resourceDescription
- describes the file that was too oldreason
- the reason for this exception if the version is not available
-
IndexFormatTooOldException
public IndexFormatTooOldException(DataInput in, java.lang.String reason)
Creates anIndexFormatTooOldException
.- Parameters:
in
- the open file that's too oldreason
- the reason for this exception if the version is not available
-
IndexFormatTooOldException
public IndexFormatTooOldException(java.lang.String resourceDescription, int version, int minVersion, int maxVersion)
Creates anIndexFormatTooOldException
.- Parameters:
resourceDescription
- describes the file that was too oldversion
- the version of the file that was too oldminVersion
- the minimum version acceptedmaxVersion
- the maximum version accepted
-
IndexFormatTooOldException
public IndexFormatTooOldException(DataInput in, int version, int minVersion, int maxVersion)
Creates anIndexFormatTooOldException
.- Parameters:
in
- the open file that's too oldversion
- the version of the file that was too oldminVersion
- the minimum version acceptedmaxVersion
- the maximum version accepted
-
-
Method Detail
-
getResourceDescription
public java.lang.String getResourceDescription()
Returns a description of the file that was too old
-
getReason
public java.lang.String getReason()
Returns an optional reason for this exception if the version information was not available. Otherwisenull
-
getVersion
public java.lang.Integer getVersion()
Returns the version of the file that was too old. This method will returnnull
if an alternativegetReason()
is provided.
-
getMaxVersion
public java.lang.Integer getMaxVersion()
Returns the maximum version accepted. This method will returnnull
if an alternativegetReason()
is provided.
-
getMinVersion
public java.lang.Integer getMinVersion()
Returns the minimum version accepted This method will returnnull
if an alternativegetReason()
is provided.
-
-