Package org.elasticsearch.common.collect

Examples of org.elasticsearch.common.collect.MapMaker


    }

    @Override protected ConcurrentMap<Object, DocSet> buildFilterMap() {
        // DocSet are not really stored with strong reference only when searching on them...
        // Filter might be stored in query cache
        MapMaker mapMaker = new MapMaker().softValues();
        if (maxSize != -1) {
            mapMaker.maximumSize(maxSize);
        }
        if (expire != null && expire.nanos() > 0) {
            mapMaker.expireAfterAccess(expire.nanos(), TimeUnit.NANOSECONDS);
        }
        mapMaker.evictionListener(this);
        return mapMaker.makeMap();
    }
View Full Code Here


        indexSettingsService.removeListener(applySettings);
        super.close();
    }

    @Override protected ConcurrentMap<Object, DocSet> buildFilterMap() {
        MapMaker mapMaker = new MapMaker().weakValues();
        if (maxSize != -1) {
            mapMaker.maximumSize(maxSize);
        }
        if (expire != null) {
            mapMaker.expireAfterAccess(expire.nanos(), TimeUnit.NANOSECONDS);
        }
        mapMaker.evictionListener(this);
        return mapMaker.makeMap();
    }
View Full Code Here

* @author kimchy (shay.banon)
*/
public class WeakQueryParserCache extends AbstractJvmQueryParserCache {

    @Inject public WeakQueryParserCache(Index index, @IndexSettings Settings indexSettings) {
        super(index, indexSettings, new MapMaker().weakValues().<QueryParserSettings, Query>makeMap());
    }
View Full Code Here

        indexSettingsService.removeListener(applySettings);
        super.close();
    }

    @Override protected ConcurrentMap<Object, DocSet> buildFilterMap() {
        MapMaker mapMaker = new MapMaker();
        if (maxSize != -1) {
            mapMaker.maximumSize(maxSize);
        }
        if (expire != null) {
            mapMaker.expireAfterAccess(expire.nanos(), TimeUnit.NANOSECONDS);
        }
        mapMaker.evictionListener(this);
        return mapMaker.makeMap();
    }
View Full Code Here

* @author kimchy (shay.banon)
*/
public class SoftQueryParserCache extends AbstractJvmQueryParserCache {

    @Inject public SoftQueryParserCache(Index index, @IndexSettings Settings indexSettings) {
        super(index, indexSettings, new MapMaker().softValues().<QueryParserSettings, Query>makeMap());
    }
View Full Code Here

    @Inject public WeakFieldDataCache(Index index, @IndexSettings Settings indexSettings) {
        super(index, indexSettings);
    }

    @Override protected ConcurrentMap<String, FieldData> buildFieldDataMap() {
        return new MapMaker().weakValues().evictionListener(this).makeMap();
    }
View Full Code Here

        indexSettingsService.removeListener(applySettings);
        super.close();
    }

    @Override protected ConcurrentMap<String, FieldData> buildFieldDataMap() {
        MapMaker mapMaker = new MapMaker();
        if (maxSize != -1) {
            mapMaker.maximumSize(maxSize);
        }
        if (expire != null) {
            mapMaker.expireAfterAccess(expire.nanos(), TimeUnit.NANOSECONDS);
        }
        mapMaker.evictionListener(this);
        return mapMaker.makeMap();
    }
View Full Code Here

    @Inject public SoftFieldDataCache(Index index, @IndexSettings Settings indexSettings) {
        super(index, indexSettings);
    }

    @Override protected ConcurrentMap<String, FieldData> buildFieldDataMap() {
        return new MapMaker().softValues().evictionListener(this).makeMap();
    }
View Full Code Here

        }
        final BufferedImage finalImg = img;



        final Map<FeatureEnum, LireFeature> featureExtractMap = new MapMaker().makeMap();

        // have multiple features, use ThreadPool to process each feature
        if (useThreadPool && features.size() > 1) {
            final CountDownLatch latch = new CountDownLatch(features.size());
            Executor executor = threadPool.generic();
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.collect.MapMaker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.