Enum StopReason

  • All Implemented Interfaces:
    Serializable, Comparable<StopReason>

    public enum StopReason
    extends Enum<StopReason>
    Class for containing a reason for stopping the harvesting of a domain. There are five possible reasons:
    1) We have now harvested the whole domain (DOWNLOAD_COMPLETE)
    2) We have now harvested the number of objects allowed from this domain in this iteration (OBJECT_LIMIT)
    3) We have now harvested the the number of bytes allowed from this domain in this iteration (SIZE_LIMIT)
    4) We stopped harvesting because we hit the per-configuration limit (CONFIG_SIZE_LIMIT)
    5) We don't know whether or not the harvesting is completed, because the crawler did not finish in an orderly way (DOWNLOAD_UNFINISHED)

    Note: This enum is serialized to the database using the order in which these are defined. Thus the order of stop reasons MUST NOT BE CHANGED!

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CONFIG_OBJECT_LIMIT
      Stop reason is configuration object limit reached, when the domain reached the maximum number of objects allowed by the configuration.
      CONFIG_SIZE_LIMIT
      Stop reason is configuration size limit reached, when the domain reached the maximum number of bytes allowed by the configuration.
      DOWNLOAD_COMPLETE
      Stop reason is download complete, when all pages within the scope of the harvest template have been downloaded.
      DOWNLOAD_UNFINISHED
      Stop reason is download unfinished, when we don't know whether or not the harvesting is completed, because the crawler did not finish in an orderly way.
      OBJECT_LIMIT
      Stop reason is object limit reached, when the domain reached the maximum number of objects allowed by the harvest.
      SIZE_LIMIT
      Stop reason is size limit reached, when the domain reached the maximum number of bytes allowed by the harvest.
      TIME_LIMIT
      Stop reason is harvesting time limit reached, when the harvester is not finished with harvesting the domain when the harvester reaches its time-limit.
    • Enum Constant Detail

      • DOWNLOAD_COMPLETE

        public static final StopReason DOWNLOAD_COMPLETE
        Stop reason is download complete, when all pages within the scope of the harvest template have been downloaded.
      • OBJECT_LIMIT

        public static final StopReason OBJECT_LIMIT
        Stop reason is object limit reached, when the domain reached the maximum number of objects allowed by the harvest.
      • SIZE_LIMIT

        public static final StopReason SIZE_LIMIT
        Stop reason is size limit reached, when the domain reached the maximum number of bytes allowed by the harvest.
      • CONFIG_SIZE_LIMIT

        public static final StopReason CONFIG_SIZE_LIMIT
        Stop reason is configuration size limit reached, when the domain reached the maximum number of bytes allowed by the configuration.
      • DOWNLOAD_UNFINISHED

        public static final StopReason DOWNLOAD_UNFINISHED
        Stop reason is download unfinished, when we don't know whether or not the harvesting is completed, because the crawler did not finish in an orderly way.
      • CONFIG_OBJECT_LIMIT

        public static final StopReason CONFIG_OBJECT_LIMIT
        Stop reason is configuration object limit reached, when the domain reached the maximum number of objects allowed by the configuration.
      • TIME_LIMIT

        public static final StopReason TIME_LIMIT
        Stop reason is harvesting time limit reached, when the harvester is not finished with harvesting the domain when the harvester reaches its time-limit.
    • Method Detail

      • values

        public static StopReason[] 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 (StopReason c : StopReason.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StopReason valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getLocalizedString

        public String getLocalizedString​(Locale l)
        Return a localized string describing a stopreason.
        Parameters:
        l - the locale
        Returns:
        a localized string describing a stopreason.