From 72599ad00374dbb904e9533968b8d402ea322021 Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 18 Feb 2010 13:56:14 +0200 Subject: [PATCH] generics --- .../index/cache/filter/soft/SoftFilterCache.java | 4 +++- .../filter/support/AbstractConcurrentMapFilterCache.java | 2 +- .../index/cache/filter/weak/WeakFilterCache.java | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java index ba84907920d..c49dee4383a 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/soft/SoftFilterCache.java @@ -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 buildMap() { return new MapMaker().softValues().makeMap(); } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java index 1d4ab2af9e6..ef110c1296f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/support/AbstractConcurrentMapFilterCache.java @@ -80,7 +80,7 @@ public abstract class AbstractConcurrentMapFilterCache extends AbstractIndexComp } } - protected abstract ConcurrentMap buildMap(); + protected abstract ConcurrentMap buildMap(); private class SoftFilterCacheFilterWrapper extends Filter { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java index abbfab35bac..3c275c376b0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/cache/filter/weak/WeakFilterCache.java @@ -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 buildMap() { return new MapMaker().weakValues().makeMap(); } } \ No newline at end of file