|
7 | 7 |
|
8 | 8 | package org.elasticsearch.xpack.core.watcher.transport.actions.put; |
9 | 9 |
|
10 | | -import org.elasticsearch.TransportVersions; |
11 | 10 | import org.elasticsearch.action.ActionRequestValidationException; |
12 | 11 | import org.elasticsearch.action.ActionType; |
13 | 12 | import org.elasticsearch.action.ValidateActions; |
|
17 | 16 | import org.elasticsearch.common.io.stream.StreamInput; |
18 | 17 | import org.elasticsearch.common.io.stream.StreamOutput; |
19 | 18 | import org.elasticsearch.core.TimeValue; |
20 | | -import org.elasticsearch.core.UpdateForV9; |
21 | 19 |
|
22 | 20 | import java.io.IOException; |
23 | 21 | import java.util.Map; |
@@ -56,30 +54,14 @@ public Request(TimeValue masterNodeTimeout, TimeValue ackTimeout, Map<String, Ob |
56 | 54 | this.settings = settings; |
57 | 55 | } |
58 | 56 |
|
59 | | - public static Request readFrom(StreamInput in) throws IOException { |
60 | | - if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) { |
61 | | - return new Request(in); |
62 | | - } else { |
63 | | - return new Request(TimeValue.THIRTY_SECONDS, TimeValue.THIRTY_SECONDS, in); |
64 | | - } |
65 | | - } |
66 | | - |
67 | | - private Request(StreamInput in) throws IOException { |
| 57 | + public Request(StreamInput in) throws IOException { |
68 | 58 | super(in); |
69 | 59 | this.settings = in.readGenericMap(); |
70 | 60 | } |
71 | 61 |
|
72 | | - @UpdateForV9(owner = UpdateForV9.Owner.DATA_MANAGEMENT) // bwc no longer required |
73 | | - private Request(TimeValue masterNodeTimeout, TimeValue ackTimeout, StreamInput in) throws IOException { |
74 | | - super(masterNodeTimeout, ackTimeout); |
75 | | - this.settings = in.readGenericMap(); |
76 | | - } |
77 | | - |
78 | 62 | @Override |
79 | 63 | public void writeTo(StreamOutput out) throws IOException { |
80 | | - if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) { |
81 | | - super.writeTo(out); |
82 | | - } |
| 64 | + super.writeTo(out); |
83 | 65 | out.writeGenericMap(this.settings); |
84 | 66 | } |
85 | 67 |
|
|
0 commit comments