Package org.exist.util.hashtable

Examples of org.exist.util.hashtable.Object2LongHashMap


    private Object2LongHashMap names;
    private BrokerPool pool;

    public CollectionCache(BrokerPool pool, int blockBuffers, double growthThreshold) {
        super(blockBuffers, 2.0, 0.000001, CacheManager.DATA_CACHE);
        this.names = new Object2LongHashMap(blockBuffers);
        this.pool = pool;
        setFileName("collection cache");
    }
View Full Code Here


        if (newSize < max) {
            shrink(newSize);
        } else {
            LOG.debug("Growing collection cache to " + newSize);
            SequencedLongHashMap<Cacheable> newMap = new SequencedLongHashMap<Cacheable>(newSize * 2);
            Object2LongHashMap newNames = new Object2LongHashMap(newSize);
            SequencedLongHashMap.Entry<Cacheable> next = map.getFirstEntry();
            Cacheable cacheable;
            while(next != null) {
                cacheable = next.getValue();
                newMap.put(cacheable.getKey(), cacheable);
                newNames.put(((Collection) cacheable).getURI().getRawCollectionPath(), cacheable.getKey());
                next = next.getNext();
            }
            max = newSize;
            map = newMap;
            names = newNames;
View Full Code Here

    }

    @Override
    protected void shrink(int newSize) {
        super.shrink(newSize);
        names = new Object2LongHashMap(newSize);
    }
View Full Code Here

TOP

Related Classes of org.exist.util.hashtable.Object2LongHashMap

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.