File tree 8 files changed +8
-78
lines changed
modules/reindex/src/test/java/org/elasticsearch/index/reindex
main/java/org/elasticsearch
test/java/org/elasticsearch
8 files changed +8
-78
lines changed Original file line number Diff line number Diff line change 41
41
import static org .elasticsearch .common .unit .TimeValue .parseTimeValue ;
42
42
43
43
/**
44
- * Round trip tests for all Streamable things declared in this plugin.
44
+ * Round trip tests for all {@link Writeable} things declared in this plugin.
45
45
*/
46
46
public class RoundTripTests extends ESTestCase {
47
47
public void testReindexRequest () throws IOException {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
* Implementers can be written to a {@linkplain StreamOutput} and read from a {@linkplain StreamInput}. This allows them to be "thrown
26
26
* across the wire" using Elasticsearch's internal protocol. If the implementer also implements equals and hashCode then a copy made by
27
27
* serializing and deserializing must be equal and have the same hashCode. It isn't required that such a copy be entirely unchanged.
28
- * <p>
29
- * Prefer implementing this interface over implementing {@link Streamable} where possible. Lots of code depends on {@linkplain Streamable}
30
- * so this isn't always possible.
31
28
*/
32
29
public interface Writeable {
33
30
Original file line number Diff line number Diff line change 47
47
* <p>
48
48
* Tasks are used for communication with transport actions. As a result, they can contain callback
49
49
* references as well as mutable state. That makes it impractical to send tasks over transport channels
50
- * and use in APIs. Instead, immutable and streamable TaskInfo objects are used to represent
50
+ * and use in APIs. Instead, immutable and writeable TaskInfo objects are used to represent
51
51
* snapshot information about currently running tasks.
52
52
*/
53
53
public final class TaskInfo implements Writeable , ToXContentFragment {
Original file line number Diff line number Diff line change 20
20
package org .elasticsearch .transport ;
21
21
22
22
import org .elasticsearch .common .io .stream .StreamInput ;
23
- import org .elasticsearch .common .io .stream .Streamable ;
24
23
import org .elasticsearch .common .io .stream .Writeable ;
25
24
import org .elasticsearch .common .transport .TransportAddress ;
26
25
27
- import java .io .IOException ;
28
-
29
- public abstract class TransportMessage implements Streamable , Writeable {
26
+ public abstract class TransportMessage implements Writeable {
30
27
31
28
private TransportAddress remoteAddress ;
32
29
@@ -41,18 +38,11 @@ public TransportAddress remoteAddress() {
41
38
/**
42
39
* Constructs a new empty transport message
43
40
*/
44
- public TransportMessage () {
45
- }
41
+ public TransportMessage () {}
46
42
47
43
/**
48
44
* Constructs a new transport message with the data from the {@link StreamInput}. This is
49
45
* currently a no-op
50
46
*/
51
- public TransportMessage (StreamInput in ) throws IOException {
52
- }
53
-
54
- @ Override
55
- public final void readFrom (StreamInput in ) throws IOException {
56
- throw new UnsupportedOperationException ("usage of Streamable is to be replaced by Writeable" );
57
- }
47
+ public TransportMessage (StreamInput in ) {}
58
48
}
Original file line number Diff line number Diff line change 48
48
import static org .hamcrest .CoreMatchers .containsString ;
49
49
50
50
public class GetSnapshotsResponseTests extends ESTestCase {
51
- // We can not subclass AbstractStreamableXContentTestCase because it
51
+ // We can not subclass AbstractSerializingTestCase because it
52
52
// can only be used for instances with equals and hashCode
53
53
// GetSnapshotResponse does not override equals and hashCode.
54
54
// It does not override equals and hashCode, because it
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ protected Predicate<String> getRandomFieldsExcludeFilter() {
72
72
@ Override
73
73
protected void assertEqualInstances (UpdateSettingsRequest expectedInstance , UpdateSettingsRequest newInstance ) {
74
74
// here only the settings should be tested, as this test covers explicitly only the XContent parsing
75
- // the rest of the request fields are tested by the StreamableTests
75
+ // the rest of the request fields are tested by the SerializingTests
76
76
super .assertEqualInstances (new UpdateSettingsRequest (expectedInstance .settings ()),
77
77
new UpdateSettingsRequest (newInstance .settings ()));
78
78
}
Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ public String getWriteableName() {
430
430
}
431
431
}
432
432
433
- public void testWriteStreamableList () throws IOException {
433
+ public void testWriteWriteableList () throws IOException {
434
434
final int size = randomIntBetween (0 , 5 );
435
435
final List <TestWriteable > expected = new ArrayList <>(size );
436
436
You can’t perform that action at this time.
0 commit comments