99
1010package  org .elasticsearch .action .admin .cluster .state ;
1111
12- import  org .elasticsearch .TransportVersions ;
1312import  org .elasticsearch .action .ActionRequestValidationException ;
1413import  org .elasticsearch .action .IndicesRequest ;
1514import  org .elasticsearch .action .support .IndicesOptions ;
1615import  org .elasticsearch .action .support .local .LocalClusterStateRequest ;
1716import  org .elasticsearch .common .Strings ;
1817import  org .elasticsearch .common .io .stream .StreamInput ;
19- import  org .elasticsearch .common .io .stream .StreamOutput ;
2018import  org .elasticsearch .core .TimeValue ;
2119import  org .elasticsearch .tasks .CancellableTask ;
2220import  org .elasticsearch .tasks .Task ;
@@ -47,7 +45,7 @@ public ClusterStateRequest(TimeValue masterNodeTimeout) {
4745    /** 
4846     * Even though this request is only executed on the local node, we still need to be able to serialize it for cross-cluster requests. 
4947     */ 
50-     public   ClusterStateRequest (StreamInput  in ) throws  IOException  {
48+     ClusterStateRequest (StreamInput  in ) throws  IOException  {
5149        super (in );
5250        routingTable  = in .readBoolean ();
5351        nodes  = in .readBoolean ();
@@ -60,25 +58,6 @@ public ClusterStateRequest(StreamInput in) throws IOException {
6058        waitForMetadataVersion  = in .readOptionalLong ();
6159    }
6260
63-     @ Override 
64-     public  void  writeTo (StreamOutput  out ) throws  IOException  {
65-         getParentTask ().writeTo (out );
66-         out .writeTimeValue (masterTimeout ());
67-         if  (out .getTransportVersion ().onOrAfter (TransportVersions .V_8_15_0 )) {
68-             out .writeVLong (0L ); // Master term 
69-         } // else no protection against routing loops in older versions 
70-         out .writeBoolean (true ); // Local 
71-         out .writeBoolean (routingTable );
72-         out .writeBoolean (nodes );
73-         out .writeBoolean (metadata );
74-         out .writeBoolean (blocks );
75-         out .writeBoolean (customs );
76-         out .writeStringArray (indices );
77-         indicesOptions .writeIndicesOptions (out );
78-         out .writeTimeValue (waitForTimeout );
79-         out .writeOptionalLong (waitForMetadataVersion );
80-     }
81- 
8261    @ Override 
8362    public  ActionRequestValidationException  validate () {
8463        return  null ;
0 commit comments