Package net.yacy.kelondro.index

Examples of net.yacy.kelondro.index.RAMIndex


        // write object cache table
        final Iterator<Map.Entry<String, RAMIndex>> oi = RAMIndex.objects();
        c = 0;
        mem = 0;
        Map.Entry<String, RAMIndex> oie;
        RAMIndex cache;
        long hitmem, totalhitmem = 0;
        while (oi.hasNext()) {
            try {
                oie = oi.next();
            } catch (final ConcurrentModificationException e) {
                break;
            }
            filename = oie.getKey();
            cache = oie.getValue();
            prop.put("indexcache_" + c + "_Name", ((p = filename.indexOf("DATA")) < 0) ? filename : filename.substring(p));

            hitmem = cache.mem();
            totalhitmem += hitmem;
            prop.put("indexcache_" + c + "_ChunkSize", cache.row().objectsize);
            prop.putNum("indexcache_" + c + "_Count", cache.size());
            prop.put("indexcache_" + c + "_NeededMem", cache.size() * cache.row().objectsize);
            prop.put("indexcache_" + c + "_UsedMem", hitmem);

            c++;
        }
        prop.put("indexcache", c);
View Full Code Here


        // write object cache table
        final Iterator<Map.Entry<String, RAMIndex>> oi = RAMIndex.objects();
        c = 0;
        mem = 0;
        Map.Entry<String, RAMIndex> oie;
        RAMIndex cache;
        long hitmem, totalhitmem = 0;
        while (oi.hasNext()) {
            try {
                oie = oi.next();
            } catch (final ConcurrentModificationException e) {
                break;
            }
            filename = oie.getKey();
            cache = oie.getValue();
            prop.put("indexcache_" + c + "_Name", ((p = filename.indexOf("DATA",0)) < 0) ? filename : filename.substring(p));

            hitmem = cache.mem();
            totalhitmem += hitmem;
            prop.put("indexcache_" + c + "_ChunkSize", cache.row().objectsize);
            prop.putNum("indexcache_" + c + "_Count", cache.size());
            prop.put("indexcache_" + c + "_NeededMem", cache.size() * cache.row().objectsize);
            prop.put("indexcache_" + c + "_UsedMem", hitmem);

            c++;
        }
        prop.put("indexcache", c);
View Full Code Here

TOP

Related Classes of net.yacy.kelondro.index.RAMIndex

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.