public class PortalQuotaService extends QuotaService
client, DEFAULT_QUOTA_ID, executor, nodeId| Modifier and Type | Method and Description |
|---|---|
void |
enforce(java.lang.String quotaSubject,
org.dataone.service.types.v1.Subject requestor,
java.lang.String instanceId,
org.dataone.service.types.v2.SystemMetadata sysmeta,
java.lang.String method)
The method will be implemented by the child classes to enforce the quota service
|
static QuotaService |
getInstance(java.util.concurrent.ExecutorService executor,
BookKeeperClient client)
Get a singleton class instance
|
checkQuota, deleteUsage, isLastUnarchivedInChain, isLastUndeletedInChain, updateUsagepublic static QuotaService getInstance(java.util.concurrent.ExecutorService executor, BookKeeperClient client)
executor - a thread executor serviceclient - the client to connect the remote book keeper serverpublic void enforce(java.lang.String quotaSubject,
org.dataone.service.types.v1.Subject requestor,
java.lang.String instanceId,
org.dataone.service.types.v2.SystemMetadata sysmeta,
java.lang.String method)
throws org.dataone.service.exceptions.ServiceFailure,
org.dataone.service.exceptions.InvalidRequest,
org.dataone.service.exceptions.InsufficientResources,
org.dataone.service.exceptions.NotImplemented,
org.dataone.service.exceptions.NotFound,
java.io.UnsupportedEncodingException
QuotaServiceenforce in class QuotaServicequotaSubject - the subject of the quota which will be usedrequestor - the subject of the user who requests the usageinstanceId - the id of the object will be applied the quotasysmeta - the system metadata of the object which will use the quotamethod - the method name which will call the createUsage method (create or update)org.dataone.service.exceptions.ServiceFailureorg.dataone.service.exceptions.InvalidRequestorg.dataone.service.exceptions.InsufficientResourcesorg.dataone.service.exceptions.NotImplementedorg.dataone.service.exceptions.NotFoundjava.io.UnsupportedEncodingExceptionCopyright © 2023 Regents of the University of California. All Rights Reserved.