Class 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
    • 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 return null if an alternative getReason() 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 old
      java.lang.Integer getVersion()
      Returns the version of the file that was too old.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • resourceDescription

        private final java.lang.String resourceDescription
      • reason

        private final java.lang.String reason
      • version

        private final java.lang.Integer version
      • minVersion

        private final java.lang.Integer minVersion
      • maxVersion

        private final java.lang.Integer maxVersion
    • Constructor Detail

      • IndexFormatTooOldException

        public IndexFormatTooOldException​(java.lang.String resourceDescription,
                                          java.lang.String reason)
        Creates an IndexFormatTooOldException.
        Parameters:
        resourceDescription - describes the file that was too old
        reason - the reason for this exception if the version is not available
      • IndexFormatTooOldException

        public IndexFormatTooOldException​(DataInput in,
                                          java.lang.String reason)
        Creates an IndexFormatTooOldException.
        Parameters:
        in - the open file that's too old
        reason - 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 an IndexFormatTooOldException.
        Parameters:
        resourceDescription - describes the file that was too old
        version - the version of the file that was too old
        minVersion - the minimum version accepted
        maxVersion - the maximum version accepted
      • IndexFormatTooOldException

        public IndexFormatTooOldException​(DataInput in,
                                          int version,
                                          int minVersion,
                                          int maxVersion)
        Creates an IndexFormatTooOldException.
        Parameters:
        in - the open file that's too old
        version - the version of the file that was too old
        minVersion - the minimum version accepted
        maxVersion - 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. Otherwise null
      • getVersion

        public java.lang.Integer getVersion()
        Returns the version of the file that was too old. This method will return null if an alternative getReason() is provided.
      • getMaxVersion

        public java.lang.Integer getMaxVersion()
        Returns the maximum version accepted. This method will return null if an alternative getReason() is provided.
      • getMinVersion

        public java.lang.Integer getMinVersion()
        Returns the minimum version accepted This method will return null if an alternative getReason() is provided.