Examples of AdminCommand


Examples of com.aerospike.client.command.AdminCommand

   * @param roles          variable arguments array of role names.  Valid roles are listed in Role.cs
   * @throws AerospikeException  if command fails
   */
  public void createUser(AdminPolicy policy, String user, String password, List<String> roles) throws AerospikeException {
    String hash = AdminCommand.hashPassword(password);
    AdminCommand command = new AdminCommand();
    command.createUser(cluster, policy, user, hash, roles);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param policy        admin configuration parameters, pass in null for defaults
   * @param user          user name
   * @throws AerospikeException  if command fails
   */
  public void dropUser(AdminPolicy policy, String user) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    command.dropUser(cluster, policy, user);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

    if (cluster.getUser() == null) {
      throw new AerospikeException("Invalid user");
    }

    String hash = AdminCommand.hashPassword(password);
    AdminCommand command = new AdminCommand();
    byte[] userBytes = Buffer.stringToUtf8(user);

    if (Arrays.equals(userBytes, cluster.getUser())) {
      // Change own password.
      command.changePassword(cluster, policy, userBytes, hash);
    }
    else {
      // Change other user's password by user admin.
      command.setPassword(cluster, policy, userBytes, hash);
    }
    cluster.changePassword(userBytes, hash);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param user          user name
   * @param roles          role names.  Valid roles are listed in Role.cs
   * @throws AerospikeException  if command fails
   */
  public void GrantRoles(AdminPolicy policy, String user, List<String> roles) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    command.grantRoles(cluster, policy, user, roles);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param user          user name
   * @param roles          role names.  Valid roles are listed in Role.cs
   * @throws AerospikeException  if command fails
   */
  public void RevokeRoles(AdminPolicy policy, String user, List<String> roles) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    command.revokeRoles(cluster, policy, user, roles);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param user          user name
   * @param roles          role names.  Valid roles are listed in Role.cs
   * @throws AerospikeException  if command fails
   */
  public void ReplaceRoles(AdminPolicy policy, String user, List<String> roles) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    command.replaceRoles(cluster, policy, user, roles);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param policy        admin configuration parameters, pass in null for defaults
   * @param user          user name filter
   * @throws AerospikeException  if command fails
   */
  public UserRoles QueryUser(AdminPolicy policy, String user) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    return command.queryUser(cluster, policy, user);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   *
   * @param policy        admin configuration parameters, pass in null for defaults
   * @throws AerospikeException  if command fails
   */
  public List<UserRoles> QueryUsers(AdminPolicy policy) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    return command.queryUsers(cluster, policy);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param roles          variable arguments array of role names.  Valid roles are listed in Role.cs
   * @throws AerospikeException  if command fails
   */
  public void createUser(AdminPolicy policy, String user, String password, List<String> roles) throws AerospikeException {
    String hash = AdminCommand.hashPassword(password);
    AdminCommand command = new AdminCommand();
    command.createUser(cluster, policy, user, hash, roles);
  }
View Full Code Here

Examples of com.aerospike.client.command.AdminCommand

   * @param policy        admin configuration parameters, pass in null for defaults
   * @param user          user name
   * @throws AerospikeException  if command fails
   */
  public void dropUser(AdminPolicy policy, String user) throws AerospikeException {
    AdminCommand command = new AdminCommand();
    command.dropUser(cluster, policy, user);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.