Package org.apache.uima.util
Interface Progress
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ProgressImpl
public interface Progress extends Serializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getCompleted()
The amount completed, in terms of units specified bygetUnit()
.long
getTotal()
The total amount being processed, in terms of units specified bygetUnit()
.String
getUnit()
The unit type represented by thegetCompleted()
andgetTotal()
numbers.boolean
isApproximate()
Returns true if the progress statistics are approximate, for example if the total number of entities in the collection is not known.
-
-
-
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 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
-
-