class DBService implements RolesProvider {

    void executePutMembershipDecision(ResourceContext ctx, String domainName, String roleName,
            RoleMember roleMember, 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(false, true)) {

                String principal = getPrincipalName(ctx);

                // make sure the role auditing requirements are met

                Role originalRole = con.getRole(domainName, roleName);
                if (originalRole == null) {
                    con.rollbackChanges();
                    throw ZMSUtils.notFoundError("unknown role: " + roleName, caller);
                }

                checkObjectAuditEnabled(con, originalRole.getAuditEnabled(), originalRole.getName(),
                        auditRef, caller, principal);

                // process our confirm role member support

                if (!con.confirmRoleMember(domainName, roleName, roleMember, principal, auditRef)) {
                    con.rollbackChanges();
                    throw ZMSUtils.requestError("unable to apply role membership decision for member: " +
                            roleMember.getMemberName() + " and role: " + roleName, caller);
                }

                // update our domain time-stamp and save changes

                con.updateRoleModTimestamp(domainName, roleName);
                saveChanges(con, domainName);

                // audit log the request

                StringBuilder auditDetails = new StringBuilder(ZMSConsts.STRING_BLDR_SIZE_DEFAULT);
                auditLogRoleMember(auditDetails, roleMember, true);

                auditLogRequest(ctx, domainName, auditRef, caller, ZMSConsts.HTTP_PUT,
                        roleName, auditDetails.toString());

                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);

}