edu.ucsb.nceas.metacat.dataone.quota

## Class FailedReportingAttemptChecker

- java.lang.Object
- - java.util.TimerTask
  - - edu.ucsb.nceas.metacat.dataone.quota.FailedReportingAttemptChecker

- All Implemented Interfaces:
    java.lang.Runnable

      public class FailedReportingAttemptChecker
      extends java.util.TimerTask

  This class periodically gets reporting usages which were failed to be reported to the remote book keeper service (e.g. the failure of the network) and report them again. The indicator of the failed reporting is that the reported_date is null in the local usage table.
  Author:
    tao

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FailedReportingAttemptChecker(java.util.concurrent.ExecutorService executor, BookKeeperClient bookkeeperClient)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` It will get the list of unreported usages and re-submit them to the book keeper server again.

    - ### Methods inherited from class java.util.TimerTask

      `cancel, scheduledExecutionTime`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FailedReportingAttemptChecker

          public FailedReportingAttemptChecker(java.util.concurrent.ExecutorService executor,
                                               BookKeeperClient bookkeeperClient)

      Constructor
      Parameters:
        `executor` - the executor which will accept the runnable reporting classes
        `bookkeeperClient` - the book keeper client which will access the remote the server

  - ### Method Detail

    - #### run

          public void run()

      It will get the list of unreported usages and re-submit them to the book keeper server again.
      Specified by:
        `run` in interface `java.lang.Runnable`
      Specified by:
        `run` in class `java.util.TimerTask`

Copyright © 2023 Regents of the University of California. All Rights Reserved.