diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java index 6b3e3aba30e..e78b5191087 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/delete/DeleteWatchRequest.java @@ -49,18 +49,6 @@ public class DeleteWatchRequest extends MasterNodeRequest { this.id = id; } - /** - * Sets the version, which will cause the delete operation to only be performed if a matching - * version exists and no changes happened on the doc since then. - */ - public long getVersion() { - return version; - } - - public void setVersion(long version) { - this.version = version; - } - @Override public ActionRequestValidationException validate() { ActionRequestValidationException validationException = null; diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java index 0458d719a78..762828547ee 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequest.java @@ -10,8 +10,6 @@ import org.elasticsearch.action.ValidateActions; import org.elasticsearch.action.support.master.MasterNodeReadRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.index.VersionType; import org.elasticsearch.xpack.watcher.watch.Watch; import java.io.IOException; @@ -22,9 +20,6 @@ import java.io.IOException; public class GetWatchRequest extends MasterNodeReadRequest { private String id; - private long version = Versions.MATCH_ANY; - private VersionType versionType = VersionType.INTERNAL; - public GetWatchRequest() { } @@ -61,41 +56,15 @@ public class GetWatchRequest extends MasterNodeReadRequest { return id; } - /** - * Sets the version, which will cause the delete operation to only be performed if a matching - * version exists and no changes happened on the doc since then. - */ - public GetWatchRequest setVersion(long version) { - this.version = version; - return this; - } - - public long getVersion() { - return this.version; - } - - public GetWatchRequest setVersionType(VersionType versionType) { - this.versionType = versionType; - return this; - } - - public VersionType getVersionType() { - return this.versionType; - } - @Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); - version = in.readLong(); - versionType = VersionType.fromValue(in.readByte()); id = in.readString(); } @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); - out.writeLong(version); - out.writeByte(versionType.getValue()); out.writeString(id); } diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java index cb266ac8fb4..1a768e4b30a 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/watcher/transport/actions/get/GetWatchRequestBuilder.java @@ -7,7 +7,6 @@ package org.elasticsearch.xpack.watcher.transport.actions.get; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; import org.elasticsearch.client.ElasticsearchClient; -import org.elasticsearch.index.VersionType; /** * A delete document action request builder. @@ -28,12 +27,4 @@ public class GetWatchRequestBuilder extends MasterNodeReadOperationRequestBuilde request.setId(id); return this; } - - /** - * Sets the type of versioning to use. Defaults to {@link org.elasticsearch.index.VersionType#INTERNAL}. - */ - public GetWatchRequestBuilder setVersionType(VersionType versionType) { - request.setVersionType(versionType); - return this; - } }