class DBService implements RolesProvider {

    void executePutQuota(ResourceContext ctx, String domainName, Quota quota,
            String auditRef, String caller) {

        // our exception handling code does the check for retry count
        // and throws the exception it had received when the retry
        // count reaches 0

        for (int retryCount = defaultRetryCount; ; retryCount--) {

            try (ObjectStoreConnection con = store.getConnection(true, true)) {

                // process our insert quota. since this is a "single"
                // operation, we are not using any transactions.

                if (con.getQuota(domainName) != null) {
                    con.updateQuota(domainName, quota);
                } else {
                    con.insertQuota(domainName, quota);
                }

                auditLogRequest(ctx, domainName, auditRef, caller, ZMSConsts.HTTP_PUT,
                        domainName, null);

                return;

            } catch (ResourceException ex) {

                // otherwise check if we need to retry or return failure

                if (!shouldRetryOperation(ex, retryCount)) {
                    throw ex;
                }
            }
        }
    }

    public  DBService(ObjectStore store, AuditLogger auditLogger, ZMSConfig zmsConfig, AuditReferenceValidator auditReferenceValidator);

}