Package org.opends.server.backends.task
Class Task.WorkCounters
java.lang.Object
org.opends.server.backends.task.Task.WorkCounters
- Enclosing class:
- Task
Data holder for work counters.
- total number of elements to process,
- number of elements processed / done / completed,
- number of elements unprocessed / left to do
-
Constructor Summary
ConstructorDescriptionInitializes work counters to a total of zero.WorkCounters
(long totalCount) Initializes work counters to the provided total. -
Method Summary
Modifier and TypeMethodDescriptionvoid
completed
(long deltaDone) Updates the number of elements done by adding the provided delta.long
Returns the number of entries that have been processed so far.long
Returns the number of entries that remain to be processed.long
Returns the total number of elements to process.void
setTotalCount
(long totalCount) Sets the total count, and resets the number of elements done to 0.toString()
-
Constructor Details
-
WorkCounters
public WorkCounters()Initializes work counters to a total of zero. -
WorkCounters
public WorkCounters(long totalCount) Initializes work counters to the provided total.- Parameters:
totalCount
- the total count
-
-
Method Details
-
setTotalCount
public void setTotalCount(long totalCount) Sets the total count, and resets the number of elements done to 0.- Parameters:
totalCount
- the total count
-
completed
public void completed(long deltaDone) Updates the number of elements done by adding the provided delta.- Parameters:
deltaDone
- the additional number of elements done.
-
getTotalCount
public long getTotalCount()Returns the total number of elements to process.- Returns:
- the total number of elements to process
-
getTodoCount
public long getTodoCount()Returns the number of entries that remain to be processed.- Returns:
- the number of entries that remain to be processed
-
getDoneCount
public long getDoneCount()Returns the number of entries that have been processed so far.- Returns:
- the number of entries that have been processed so far
-
toString
-