Class DeleteUsageTask

java.lang.Object
edu.ucsb.nceas.metacat.dataone.quota.UsageTask
edu.ucsb.nceas.metacat.dataone.quota.DeleteUsageTask
All Implemented Interfaces:
Runnable

public class DeleteUsageTask extends UsageTask
This class represents a thread task to report an event to delete of an exiting usage to the remote bookkeeper server. It also will log the event in the local database. If the reporting to the remote book keeper service succeeds, it will set the reported date in the local usages table; otherwise it keeps the field null.
Author:
tao
  • Constructor Details

    • DeleteUsageTask

      public DeleteUsageTask(org.dataone.bookkeeper.api.Usage usage, BookKeeperClient bookkeeperClient)
      Constructor
      Parameters:
      usage - the usage will be reported
      bookkeeperClient - the client to report the usage to the remote server
  • Method Details

    • reportToBookKeeper

      protected int reportToBookKeeper() throws Exception
      Description copied from class: UsageTask
      The child class needs to implement this method to detail how to report the usage to the remote book keeper server.
      Specified by:
      reportToBookKeeper in class UsageTask
      Throws:
      Exception