File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/async Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1010import org .elasticsearch .common .io .stream .ByteBufferStreamInput ;
1111import org .elasticsearch .common .io .stream .BytesStreamOutput ;
1212import org .elasticsearch .common .io .stream .StreamInput ;
13+ import org .elasticsearch .common .io .stream .StreamOutput ;
14+ import org .elasticsearch .common .io .stream .Writeable ;
1315import org .elasticsearch .tasks .TaskId ;
1416
1517import java .io .IOException ;
2022/**
2123 * A class that contains all information related to a submitted async execution.
2224 */
23- public final class AsyncExecutionId {
25+ public final class AsyncExecutionId implements Writeable {
2426 public static final String ASYNC_EXECUTION_ID_HEADER = "X-Elasticsearch-Async-Id" ;
2527 public static final String ASYNC_EXECUTION_IS_RUNNING_HEADER = "X-Elasticsearch-Async-Is-Running" ;
2628
@@ -115,4 +117,13 @@ public static AsyncExecutionId decode(String id) {
115117 }
116118 return new AsyncExecutionId (docId , new TaskId (taskId ), id );
117119 }
120+
121+ @ Override
122+ public void writeTo (StreamOutput out ) throws IOException {
123+ out .writeString (getEncoded ());
124+ }
125+
126+ public static AsyncExecutionId readFrom (StreamInput input ) throws IOException {
127+ return decode (input .readString ());
128+ }
118129}
You can’t perform that action at this time.
0 commit comments