コード例 #1
0
    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);
      }
    }
コード例 #2
0
 public Builder(IndexShardRoutingTable indexShard) {
   this.shardId = indexShard.shardId;
   this.shards = newArrayList(indexShard.shards);
   this.primaryAllocatedPostApi = indexShard.primaryAllocatedPostApi();
 }