Class FailedReportingAttemptChecker

java.lang.Object
java.util.TimerTask
edu.ucsb.nceas.metacat.dataone.quota.FailedReportingAttemptChecker
All Implemented Interfaces:
Runnable

public class FailedReportingAttemptChecker extends 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 Details

    • FailedReportingAttemptChecker

      public FailedReportingAttemptChecker(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 Details

    • 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 Runnable
      Specified by:
      run in class TimerTask