Package org.apache.uima.util
Interface Progress
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ProgressImpl
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongThe amount completed, in terms of units specified bygetUnit().longgetTotal()The total amount being processed, in terms of units specified bygetUnit().getUnit()The unit type represented by thegetCompleted()andgetTotal()numbers.booleanReturns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.
-
Field Details
-
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
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 bygetUnit().- Returns:
- the amount completed
-
getTotal
long getTotal()The total amount being processed, in terms of units specified bygetUnit(). 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 thegetCompleted()andgetTotal()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
-