generics
This commit is contained in:
parent
23cfdeea11
commit
72599ad003
|
@ -21,6 +21,8 @@ package org.elasticsearch.index.cache.filter.soft;
|
|||
|
||||
import com.google.common.collect.MapMaker;
|
||||
import com.google.inject.Inject;
|
||||
import org.apache.lucene.search.DocIdSet;
|
||||
import org.apache.lucene.search.Filter;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.cache.filter.support.AbstractConcurrentMapFilterCache;
|
||||
import org.elasticsearch.index.settings.IndexSettings;
|
||||
|
@ -38,7 +40,7 @@ public class SoftFilterCache extends AbstractConcurrentMapFilterCache {
|
|||
super(index, indexSettings, threadPool);
|
||||
}
|
||||
|
||||
@Override protected ConcurrentMap buildMap() {
|
||||
@Override protected ConcurrentMap<Filter, DocIdSet> buildMap() {
|
||||
return new MapMaker().softValues().makeMap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public abstract class AbstractConcurrentMapFilterCache extends AbstractIndexComp
|
|||
}
|
||||
}
|
||||
|
||||
protected abstract ConcurrentMap buildMap();
|
||||
protected abstract ConcurrentMap<Filter, DocIdSet> buildMap();
|
||||
|
||||
private class SoftFilterCacheFilterWrapper extends Filter {
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ package org.elasticsearch.index.cache.filter.weak;
|
|||
|
||||
import com.google.common.collect.MapMaker;
|
||||
import com.google.inject.Inject;
|
||||
import org.apache.lucene.search.DocIdSet;
|
||||
import org.apache.lucene.search.Filter;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.cache.filter.support.AbstractConcurrentMapFilterCache;
|
||||
import org.elasticsearch.index.settings.IndexSettings;
|
||||
|
@ -38,7 +40,7 @@ public class WeakFilterCache extends AbstractConcurrentMapFilterCache {
|
|||
super(index, indexSettings, threadPool);
|
||||
}
|
||||
|
||||
@Override protected ConcurrentMap buildMap() {
|
||||
@Override protected ConcurrentMap<Filter, DocIdSet> buildMap() {
|
||||
return new MapMaker().weakValues().makeMap();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue