public ClusterState(long version, ClusterState state) {
   this(
       version,
       state.metaData(),
       state.routingTable(),
       state.nodes(),
       state.blocks(),
       state.allocationExplanation());
 }
 public static void writeTo(ClusterState state, StreamOutput out) throws IOException {
   out.writeLong(state.version());
   MetaData.Builder.writeTo(state.metaData(), out);
   RoutingTable.Builder.writeTo(state.routingTable(), out);
   DiscoveryNodes.Builder.writeTo(state.nodes(), out);
   ClusterBlocks.Builder.writeClusterBlocks(state.blocks(), out);
   state.allocationExplanation().writeTo(out);
 }
 public Builder state(ClusterState state) {
   this.version = state.version();
   this.nodes = state.nodes();
   this.routingTable = state.routingTable();
   this.metaData = state.metaData();
   this.blocks = state.blocks();
   this.allocationExplanation = state.allocationExplanation();
   return this;
 }