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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The predefined unit type "bytes".
    static final String
    The predefined unit type "entities".
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The amount completed, in terms of units specified by getUnit().
    long
    The total amount being processed, in terms of units specified by getUnit().
    The unit type represented by the getCompleted() and getTotal() numbers.
    boolean
    Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.
  • Field Details

    • 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:
    • 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:
  • Method Details

    • 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
    • getUnit

      String getUnit()
      The unit type represented by the getCompleted() and getTotal() numbers. There are some predefined unit types (BYTES, ENTITIES), but any unit can be used.
      Returns:
      the unit
    • 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