org.apache.lucene.index

Class IndexFormatTooOldException

    • Constructor Detail

      • IndexFormatTooOldException

        public IndexFormatTooOldException(String resourceDescription,
                                          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,
                                          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(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

      • getReason

        public String getReason()
        Returns an optional reason for this exception if the version information was not available. Otherwise null
      • getVersion

        public 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 Integer getMaxVersion()
        Returns the maximum version accepted. This method will return null if an alternative getReason() is provided.
      • getMinVersion

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