public int size() { if (MSSH.hasNewSearchers()) { this.extraSearchers = MSSH.getSearchers(luceneId); this.searchers.clear(); this.searchers.addAll(clusterSearchers); if (extraSearchers != null) this.searchers.addAll(extraSearchers); } return searchers.size(); }
public MultiSearcher(String luceneId, Searcher[] clusterSearchers, SearcherType searcherType) { this.luceneId = luceneId; this.searchers = new ArrayList<Searcher>(); this.clusterSearchers = new ArrayList<Searcher>(); this.extraSearchers = MSSH.getSearchers(luceneId); this.searcherType = searcherType; if (clusterSearchers != null) { for (Searcher searcher : clusterSearchers) { if (searcher != null) { this.clusterSearchers.add(searcher); } } } this.searchers.addAll(this.clusterSearchers); if (extraSearchers != null) this.searchers.addAll(this.extraSearchers); }