Skip to content

Commit

Permalink
Java API: remove duplicated consistency level setters
Browse files Browse the repository at this point in the history
`setConsistencyLevel` setter is already present in the base class `ShardReplicationOperationRequestBuilder`. It is not needed in `DeleteRequestBuilder` and `IndexRequestBuilder`.

Closes #10188
  • Loading branch information
javanna committed Mar 21, 2015
1 parent 649e3aa commit 66fa72f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Expand Up @@ -20,7 +20,6 @@
package org.elasticsearch.action.delete;

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.WriteConsistencyLevel;
import org.elasticsearch.action.support.replication.ShardReplicationOperationRequestBuilder;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Nullable;
Expand Down Expand Up @@ -100,15 +99,6 @@ public DeleteRequestBuilder setVersionType(VersionType versionType) {
return this;
}

/**
* Sets the consistency level. Defaults to {@link org.elasticsearch.action.WriteConsistencyLevel#DEFAULT}.
*/
@Override
public DeleteRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel) {
request.consistencyLevel(consistencyLevel);
return this;
}

@Override
protected void doExecute(ActionListener<DeleteResponse> listener) {
client.delete(request, listener);
Expand Down
Expand Up @@ -20,7 +20,6 @@
package org.elasticsearch.action.index;

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.WriteConsistencyLevel;
import org.elasticsearch.action.support.replication.ShardReplicationOperationRequestBuilder;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Nullable;
Expand Down Expand Up @@ -252,15 +251,6 @@ public IndexRequestBuilder setRefresh(boolean refresh) {
return this;
}

/**
* Sets the consistency level. Defaults to {@link org.elasticsearch.action.WriteConsistencyLevel#DEFAULT}.
*/
@Override
public IndexRequestBuilder setConsistencyLevel(WriteConsistencyLevel consistencyLevel) {
request.consistencyLevel(consistencyLevel);
return this;
}

/**
* Sets the version, which will cause the index operation to only be performed if a matching
* version exists and no changes happened on the doc since then.
Expand Down

0 comments on commit 66fa72f

Please sign in to comment.