Class Task.WorkCounters

java.lang.Object
org.opends.server.backends.task.Task.WorkCounters
Enclosing class:
Task

public static final class Task.WorkCounters extends Object
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

    Constructors
    Constructor
    Description
    Initializes work counters to a total of zero.
    WorkCounters(long totalCount)
    Initializes work counters to the provided total.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public String toString()
      Overrides:
      toString in class Object