Class CreateUsageTask
java.lang.Object
edu.ucsb.nceas.metacat.dataone.quota.UsageTask
edu.ucsb.nceas.metacat.dataone.quota.CreateUsageTask
- All Implemented Interfaces:
Runnable
This class represents a task to report a creation of a usage to the remote bookkeeper server and
set the reported date in the local usages table after the succeeded reporting
- Author:
- tao
-
Field Summary
Fields inherited from class edu.ucsb.nceas.metacat.dataone.quota.UsageTask
bookkeeperClient, isLoggedLocally, usage
-
Constructor Summary
ConstructorDescriptionCreateUsageTask
(org.dataone.bookkeeper.api.Usage usage, BookKeeperClient bookkeeperClient) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected int
The child class needs to implement this method to detail how to report the usage to the remote book keeper server.Methods inherited from class edu.ucsb.nceas.metacat.dataone.quota.UsageTask
run, setIsLoggedLocally
-
Constructor Details
-
CreateUsageTask
Constructor- Parameters:
usage
- the usage will be reportedbookkeeperClient
- the client to report the usage to the remote server
-
-
Method Details
-
reportToBookKeeper
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 classUsageTask
- Throws:
Exception
-