Examples of TLongIntHashMap


Examples of org.elasticsearch.common.trove.map.hash.TLongIntHashMap

        testSerializingCountingFacet(counts);
    }

    @Test
    public void testSerializingNonEmptyCountingFacet() throws Exception {
        final TLongIntHashMap counts = CacheRecycler.popLongIntMap();
        counts.put(1, 2);
        counts.put(11, 22);
        testSerializingCountingFacet(counts);
    }
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TLongIntHashMap

        counts.put(11, 22);
        testSerializingCountingFacet(counts);
    }

    private void testSerializingCountingFacet(final TLongIntHashMap counts) throws Exception {
        final TLongIntHashMap sentCounts = new TLongIntHashMap(counts);
        final InternalCountingFacet toSend = new InternalCountingFacet("foo", sentCounts);
        final InternalCountingFacet toReceive = new InternalCountingFacet();
        serializeAndDeserialize(toSend, toReceive);
        final TLongIntHashMap receivedCounts = new TLongIntHashMap(toReceive.peekCounts());
        // Check against original counts as sentCounts may have been recycled
        compareCounts(counts, receivedCounts);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.