Exemplo n.º 1
0
 /** Returns only the primary shards store size in bytes. */
 public ByteSizeValue primaryStoreSize() {
   long bytes = -1;
   for (IndexShardStatus shard : this) {
     if (shard.primaryStoreSize() != null) {
       if (bytes == -1) {
         bytes = 0;
       }
       bytes += shard.primaryStoreSize().bytes();
     }
   }
   if (bytes == -1) {
     return null;
   }
   return new ByteSizeValue(bytes);
 }