Package org.hibernate.cache.jbc2.timestamp

Examples of org.hibernate.cache.jbc2.timestamp.ClusteredConcurrentTimestampsRegionImpl$Entry


    public void testUseQueryCache() throws Exception {
        Configuration cfg = CacheTestUtil.buildConfiguration("", getRegionFactoryClass(), true, false);
       
        JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
       
        CacheInstanceManager cim = regionFactory.getCacheInstanceManager();
       
        assertNotNull(cim.getCollectionCacheInstance());
        assertNotNull(cim.getEntityCacheInstance());
        assertNull(cim.getQueryCacheInstance());
        assertNull(cim.getTimestampsCacheInstance());
    }
View Full Code Here


        Configuration cfg = CacheTestUtil.buildConfiguration("", JBossCacheRegionFactory.class, true, true);
       
        JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
       
        CacheInstanceManager mgr = regionFactory.getCacheInstanceManager();
        assertTrue("Correct default CacheInstanceManager type", mgr instanceof SharedCacheInstanceManager);
       
        Cache cache = mgr.getEntityCacheInstance();
        assertTrue("entity cache exists", cache != null);
        assertEquals("Used correct config", "TestSharedCache", cache.getConfiguration().getClusterName());
        assertEquals("Cache started", CacheStatus.STARTED, cache.getCacheStatus());       
       
        CacheTestUtil.stopRegionFactory(regionFactory, getCacheTestSupport());
View Full Code Here

   
    public void testInjectedCacheInstanceManager() {

        Configuration cfg = CacheTestUtil.buildConfiguration("", JBossCacheRegionFactory.class, true, true);
       
        CacheInstanceManager cim = new MultiplexingCacheInstanceManager();
        JBossCacheRegionFactory regionFactory = new JBossCacheRegionFactory(cim);
       
        Settings settings = cfg.buildSettings();
        Properties properties = cfg.getProperties();
       
View Full Code Here

        return regionFactory.buildCollectionRegion(regionName, properties, cdd);
    }

    @Override
    protected Cache getJBossCache(JBossCacheRegionFactory regionFactory) {
        CacheInstanceManager mgr = regionFactory.getCacheInstanceManager();
        return mgr.getCollectionCacheInstance();
    }
View Full Code Here

        return regionFactory.buildEntityRegion(regionName, properties, cdd);
    }

    @Override
    protected Cache getJBossCache(JBossCacheRegionFactory regionFactory) {
        CacheInstanceManager mgr = regionFactory.getCacheInstanceManager();
        return mgr.getEntityCacheInstance();
    }
View Full Code Here

        return regionPrefix + "/" + StandardQueryCache.class.getName();
    }

    @Override
    protected Cache getJBossCache(JBossCacheRegionFactory regionFactory) {
        CacheInstanceManager mgr = regionFactory.getCacheInstanceManager();
        return mgr.getQueryCacheInstance();
    }
View Full Code Here

        Settings settings = cfg.buildSettings();
        Properties properties = cfg.getProperties();
       
        String factoryType = cfg.getProperty(Environment.CACHE_REGION_FACTORY);
        Class factoryClass = Thread.currentThread().getContextClassLoader().loadClass(factoryType);
        JBossCacheRegionFactory regionFactory = (JBossCacheRegionFactory) factoryClass.newInstance();
       
        regionFactory.start(settings, properties);
       
        return regionFactory;       
    }
View Full Code Here

    }
   
    public static JBossCacheRegionFactory startRegionFactory(Configuration cfg, CacheTestSupport testSupport)
            throws ClassNotFoundException, InstantiationException, IllegalAccessException {
   
        JBossCacheRegionFactory factory = startRegionFactory(cfg);
        testSupport.registerFactory(factory);
        return factory;
    }
View Full Code Here

        Fqn regionFqn = getRegionFqn("test/test", "test");
       
        assertNull("No region node", remoteCache.getRoot().getChild( regionFqn ));
       
        Configuration cfg = CacheTestUtil.buildConfiguration("test", SharedJBossCacheRegionFactory.class, true, true);
        JBossCacheRegionFactory regionFactory = CacheTestUtil.startRegionFactory(cfg, getCacheTestSupport());
       
        Region region = createRegion(regionFactory, "test/test", cfg.getProperties(), getCacheDataDescription());
       
        Cache localCache = getJBossCache( regionFactory );
       
View Full Code Here

        assertNull("No region node", localCache.getRoot().getChild( regionFqn ));
    }
   
    public void testToMap() throws Exception {
        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);
View Full Code Here

TOP

Related Classes of org.hibernate.cache.jbc2.timestamp.ClusteredConcurrentTimestampsRegionImpl$Entry

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.