Package org.apache.activemq.kaha.impl.container

Examples of org.apache.activemq.kaha.impl.container.ListContainerImpl.addAll()


    }

    public void testAdds() throws Exception{
        ListContainerImpl list=getStoreList("test");
        List data=getDataList(100);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        List cached=getCachedList(MAX_CACHE_SIZE);
        for(int i=0;i<cached.size();i++){
            list.add(i,cached.get(i));
        }
View Full Code Here


    public void testAddsIntoCacheSpace() throws Exception{
        ListContainerImpl list=getStoreList("test");
        int initialDataSize=50;
        List data=getDataList(initialDataSize);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        List cached=getCachedList(MAX_CACHE_SIZE);
        for(int i=MAX_CACHE_SIZE/2;i<cached.size();i++){
            list.add(i,cached.get(i));
        }
View Full Code Here

    public void testRemoves() throws Exception{
        ListContainerImpl list=getStoreList("test");
        int initialDataSize=10;
        List data=getDataList(initialDataSize);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        List cached=getCachedList(MAX_CACHE_SIZE);
        list.addAll(cached);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        for(int i=0;i<cached.size();i++){
View Full Code Here

        int initialDataSize=10;
        List data=getDataList(initialDataSize);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        List cached=getCachedList(MAX_CACHE_SIZE);
        list.addAll(cached);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        for(int i=0;i<cached.size();i++){
            assertNotSame(cached.get(i),list.getCacheList().get(i));
        }
        for(int i=0;i<initialDataSize;i++){
View Full Code Here

    }

    public void testCacheSize() throws Exception{
        ListContainerImpl list=getStoreList("test");
        List data=getDataList(100);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
    }

    public void testInserts() throws Exception{
        ListContainerImpl list=getStoreList("test");
View Full Code Here

    }

    public void testInserts() throws Exception{
        ListContainerImpl list=getStoreList("test");
        List data=getDataList(100);
        list.addAll(data);
        assertEquals(MAX_CACHE_SIZE,list.getCacheList().size());
        List cached=getCachedList(MAX_CACHE_SIZE);
        for(int i=0;i<cached.size();i++){
            list.set(i,cached.get(i));
        }
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.