@Override public void onQueryAdded(RegexQuery query) { synchronized (poolSearchReferences) { for (PoolSearch search : poolSearchReferences) { search.isSearching = false; } } }
@Override public void onQueryRemoved(RegexQuery query) { boolean forceStopAll = !pool.containsQueries(); synchronized (poolSearchReferences) { for (PoolSearch search : poolSearchReferences) { search.isSearching = false; search.forceStop = forceStopAll; } } }