public static void writeToThin(IndexShardRoutingTable indexShard, StreamOutput out)
        throws IOException {
      out.writeVInt(indexShard.shardId.id());
      out.writeBoolean(indexShard.primaryAllocatedPostApi());

      out.writeVInt(indexShard.shards.size());
      for (ShardRouting entry : indexShard) {
        entry.writeToThin(out);
      }
    }
 public static void writeTo(IndexShardRoutingTable indexShard, StreamOutput out)
     throws IOException {
   out.writeString(indexShard.shardId().index().name());
   writeToThin(indexShard, out);
 }
 public Builder(IndexShardRoutingTable indexShard) {
   this.shardId = indexShard.shardId;
   this.shards = newArrayList(indexShard.shards);
   this.primaryAllocatedPostApi = indexShard.primaryAllocatedPostApi();
 }