public void setShard(ShardId shardId) {
   if (shardId != null) {
     setIndex(shardId.getIndex());
     addHeader(SHARD_HEADER_KEY, Integer.toString(shardId.id()));
   }
 }
 public void setShard(String index, int shardId) {
   setIndex(index);
   addHeader(SHARD_HEADER_KEY, Integer.toString(shardId));
 }
 public void setIndex(String index) {
   if (index != null) {
     setIndex(new Index(index, INDEX_UUID_NA_VALUE));
   }
 }