Package org.shiftone.cache

Examples of org.shiftone.cache.Cache.addObject()


            assertNotNull(cache.getObject("x"));
            assertNotNull(cache.getObject("y"));
        }

        assertEquals(2, cache.size());
        cache.addObject("a", "a");
        cache.addObject("b", "b");
        assertEquals(2, cache.size());
        assertNotNull(cache.getObject("b"));
    }
View Full Code Here


            assertNotNull(cache.getObject("y"));
        }

        assertEquals(2, cache.size());
        cache.addObject("a", "a");
        cache.addObject("b", "b");
        assertEquals(2, cache.size());
        assertNotNull(cache.getObject("b"));
    }

View Full Code Here

        Cache cache = newCache(1000 * 60, 1);

        for (int i = 0; i < 20; i++)
        {
            cache.addObject("k-" + i, "v-" + i);
        }

        assertEquals(1, cache.size());
    }

View Full Code Here

        Cache              oneB     = factoryB.newInstance("one", 1000, 1000);

        for (int i = 0; i < 1000; i++)
        {
            oneA.addObject("key" + i, "value");
            oneB.addObject("key" + i, "value");
        }

        for (int i = 0; i < 1000; i++)
        {
            oneA.remove("key" + 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.