use of com.aerospike.client.admin.AdminCommand in project aerospike-client-java by aerospike.
the class AerospikeClient method setQuotas.
/**
* Set maximum reads/writes per second limits for a role. If a quota is zero, the limit is removed.
* Quotas require server security configuration "enable-quotas" to be set to true.
*
* @param policy admin configuration parameters, pass in null for defaults
* @param roleName role name
* @param readQuota maximum reads per second limit, pass in zero for no limit.
* @param writeQuota maximum writes per second limit, pass in zero for no limit.
* @throws AerospikeException if command fails
*/
public final void setQuotas(AdminPolicy policy, String roleName, int readQuota, int writeQuota) throws AerospikeException {
AdminCommand command = new AdminCommand();
command.setQuotas(cluster, policy, roleName, readQuota, writeQuota);
}
use of com.aerospike.client.admin.AdminCommand in project aerospike-client-java by aerospike.
the class AerospikeClient method revokePrivileges.
/**
* Revoke privileges from an user defined role.
*
* @param policy admin configuration parameters, pass in null for defaults
* @param roleName role name
* @param privileges privileges assigned to the role.
* @throws AerospikeException if command fails
*/
public final void revokePrivileges(AdminPolicy policy, String roleName, List<Privilege> privileges) throws AerospikeException {
AdminCommand command = new AdminCommand();
command.revokePrivileges(cluster, policy, roleName, privileges);
}
Aggregations