/** * Total. * * @return the common stats */ public CommonStats total() { if (total != null) { return total; } CommonStats stats = new CommonStats(); for (ShardStats shard : shards) { stats.add(shard.stats()); } total = stats; return stats; }
/** * Primaries. * * @return the common stats */ public CommonStats primaries() { if (primary != null) { return primary; } CommonStats stats = new CommonStats(); for (ShardStats shard : shards) { if (shard.shardRouting().primary()) { stats.add(shard.stats()); } } primary = stats; return stats; }