Interface Progress

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    ProgressImpl

    public interface Progress
    extends Serializable
    Progress statistics for a process. This is represented by an amount completed, a total amount (if known), and a unit. There are some predefined unit types (BYTES, ENTITIES), but any unit can be used.
    • Field Detail

      • ENTITIES

        static final String ENTITIES
        The predefined unit type "entities". An entity is the thing being processed, for example a document. When this unit is used, the amount completed and total amount represent a number of entities.
        See Also:
        Constant Field Values
      • BYTES

        static final String BYTES
        The predefined unit type "bytes". When this unit is used, the amount completed and total amount represent the size of the data in bytes.
        See Also:
        Constant Field Values
    • Method Detail

      • getCompleted

        long getCompleted()
        The amount completed, in terms of units specified by getUnit().
        Returns:
        the amount completed
      • getTotal

        long getTotal()
        The total amount being processed, in terms of units specified by getUnit(). For some processes, this information may not be available - in these cases, -1 will be returned.
        Returns:
        the total amount, -1 if not known
      • isApproximate

        boolean isApproximate()
        Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.
        Returns:
        true if the statistics are approximate, false if they are exact