Package org.hibernate.cache

Examples of org.hibernate.cache.Region.toMap()


        Configuration cfg = CacheTestUtil.buildConfiguration("test", SharedJBossCacheRegionFactory.class, true, true);
        JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
       
        Region region = createRegion(regionFactory, "test/test", cfg.getProperties(), getCacheDataDescription());
       
        Map map = region.toMap();
        assertNotNull(map);
        assertEquals(0, map.size());
       
        putInRegion(region, "key1", "value1");
        putInRegion(region, "key2", "value2");
View Full Code Here


        assertEquals(0, map.size());
       
        putInRegion(region, "key1", "value1");
        putInRegion(region, "key2", "value2");
       
        map = region.toMap();
        assertNotNull(map);
        assertEquals(2, map.size());
        assertEquals("value1", map.get("key1"));
        assertEquals("value2", map.get("key2"));
       
View Full Code Here

        assertEquals("value1", map.get("key1"));
        assertEquals("value2", map.get("key2"));
       
        removeFromRegion(region, "key1");
       
        map = region.toMap();
        assertNotNull(map);
        assertEquals(1, map.size());
        assertEquals("value2", map.get("key2"));
    }
   
View Full Code Here

        Configuration cfg = CacheTestUtil.buildConfiguration("test", SharedJBossCacheRegionFactory.class, true, true);
        JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
       
        Region region = createRegion(regionFactory, "test/test", cfg.getProperties(), getCacheDataDescription());
       
        Map map = region.toMap();
        assertNotNull(map);
        assertEquals(0, map.size());
       
        putInRegion(region, "key1", "value1");
        putInRegion(region, "key2", "value2");
View Full Code Here

        assertEquals(0, map.size());
       
        putInRegion(region, "key1", "value1");
        putInRegion(region, "key2", "value2");
       
        map = region.toMap();
        assertNotNull(map);
        assertEquals(2, map.size());
        assertEquals("value1", map.get("key1"));
        assertEquals("value2", map.get("key2"));
       
View Full Code Here

        assertEquals("value1", map.get("key1"));
        assertEquals("value2", map.get("key2"));
       
        removeFromRegion(region, "key1");
       
        map = region.toMap();
        assertNotNull(map);
        assertEquals(1, map.size());
        assertEquals("value2", map.get("key2"));
    }
   
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.