112113114115116117118119120121122
break; case Suggest: suggest = new SuggestStats(); break; case QueryCache: queryCache = new QueryCacheStats(); break; default: throw new IllegalStateException("Unknown Flag: " + flag); } }
381382383384385386387388389390391
} else { suggest.add(stats.getSuggest()); } if (queryCache == null) { if (stats.getQueryCache() != null) { queryCache = new QueryCacheStats(); queryCache.add(stats.getQueryCache()); } } else { queryCache.add(stats.getQueryCache()); }
564565566567568569570571
translog = in.readOptionalStreamable(new TranslogStats()); if (in.getVersion().onOrAfter(Version.V_1_2_0)) { suggest = in.readOptionalStreamable(new SuggestStats()); } if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { queryCache = in.readOptionalStreamable(new QueryCacheStats()); } }