Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove invalid parameters from DatabaseUsersOptions
  • Loading branch information
rashtao committed Jul 14, 2020
commit afa0d07817c353c3b44fddc9d6b84ff4890d63cb
63 changes: 0 additions & 63 deletions src/main/java/com/arangodb/model/DatabaseUsersOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

package com.arangodb.model;

import com.arangodb.entity.ReplicationFactor;

import java.util.Map;

/**
Expand All @@ -30,16 +28,9 @@
public class DatabaseUsersOptions {

private String username;
private ReplicationFactor replicationFactor;
private Map<String, Object> extra;
private String passwd;
private Integer writeConcern;
private Boolean active;
private String sharding;

public DatabaseUsersOptions() {
replicationFactor = new ReplicationFactor();
}

public String getUsername() {
return username;
Expand All @@ -54,28 +45,6 @@ public DatabaseUsersOptions username(final String username) {
return this;
}

public Integer getReplicationFactor() {
return replicationFactor.getReplicationFactor();
}

/**
* @param replicationFactor Default replication factor for new collections created in this database.
* @return options
*/
public DatabaseUsersOptions replicationFactor(final Integer replicationFactor) {
this.replicationFactor.setReplicationFactor(replicationFactor);
return this;
}

public Boolean getSatellite() {
return this.replicationFactor.getSatellite();
}

public DatabaseUsersOptions satellite(final Boolean satellite) {
this.replicationFactor.setSatellite(satellite);
return this;
}

public Map<String, Object> getExtra() {
return extra;
}
Expand Down Expand Up @@ -103,24 +72,6 @@ public DatabaseUsersOptions passwd(final String passwd) {
return this;
}

public Integer getWriteConcern() {
return writeConcern;
}

/**
* @param writeConcern Default write concern for new collections created in this database.
* It determines how many copies of each shard are required to be
* in sync on the different DBServers. If there are less then these many copies
* in the cluster a shard will refuse to write. Writes to shards with enough
* up-to-date copies will succeed at the same time however. The value of
* writeConcern can not be larger than replicationFactor. (cluster only)
* @return options
*/
public DatabaseUsersOptions writeConcern(final Integer writeConcern) {
this.writeConcern = writeConcern;
return this;
}

public Boolean getActive() {
return active;
}
Expand All @@ -136,18 +87,4 @@ public DatabaseUsersOptions active(final Boolean active) {
return this;
}

public String getSharding() {
return sharding;
}

/**
* @param sharding The sharding method to use for new collections in this database. Valid values
* are: "", "flexible", or "single". The first two are equivalent. (cluster only)
* @return options
*/
public DatabaseUsersOptions sharding(final String sharding) {
this.sharding = sharding;
return this;
}

}