Package org.apache.openjpa.datacache

Examples of org.apache.openjpa.datacache.ConcurrentDataCache


        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here


        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here

                + "ExcludedTypes=org.apache.openjpa.persistence.cache.jpa.model.UncacheableEntity)");
        props.put("openjpa.RemoteCommitProvider", "sjvm");
        if (emf == null) {
            emf = createEntityManagerFactory("cache-mode-all", props);
            assertNotNull(emf);
            ConcurrentDataCache dataCache =
                (ConcurrentDataCache) emf.getConfiguration().getDataCacheManagerInstance().getDataCache("default");
            assertNotNull(dataCache);
            assertEquals(5000, dataCache.getCacheSize());
            assertEquals("org.apache.openjpa.persistence.cache.jpa.DataCacheTestExtension(CacheSize=5000, "
                + "ExcludedTypes=org.apache.openjpa.persistence.cache.jpa.model.UncacheableEntity)", emf
                .getConfiguration().getDataCache());
            cache = emf.getCache();
            assertNotNull(cache);
View Full Code Here

    @Override
    public OpenJPAEntityManagerFactorySPI getEntityManagerFactory() {
        if (emf == null) {
            emf = createEntityManagerFactory("cache-mode-all",null);
            assertNotNull(emf);
            ConcurrentDataCache dataCache = (ConcurrentDataCache) emf.getConfiguration()
                    .getDataCacheManagerInstance().getDataCache("default");
            assertNotNull(dataCache);
            assertEquals(1000, dataCache.getCacheSize());
            assertEquals("true", emf.getConfiguration().getDataCache());
            cache = emf.getCache();
            assertNotNull(cache);
        }
        return emf;
View Full Code Here

            + "ExcludedTypes=org.apache.openjpa.persistence.cache.jpa.model.UncacheableEntity)");
        props.put("openjpa.RemoteCommitProvider", "sjvm");
        if (emf == null) {
            emf = createEntityManagerFactory("cache-mode-all", props);
            assertNotNull(emf);
            ConcurrentDataCache dataCache =
                (ConcurrentDataCache) emf.getConfiguration().getDataCacheManagerInstance().getDataCache("default");
            assertNotNull(dataCache);
            assertEquals(5000, dataCache.getCacheSize());
            assertEquals("true(CacheSize=5000, ExcludedTypes="
                + "org.apache.openjpa.persistence.cache.jpa.model.UncacheableEntity)", emf.getConfiguration()
                .getDataCache());
            cache = emf.getCache();
            assertNotNull(cache);
View Full Code Here

        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here

        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here

        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here

        assertNull(bMeta.getDataCache());

        assertEquals(cMeta.getDataCache(), dMeta.getDataCache());
        if (dMeta.getDataCache() instanceof ConcurrentDataCache) {
            ConcurrentDataCache dCacheImpl =
                (ConcurrentDataCache) dMeta.getDataCache();
            assertEquals(10, dCacheImpl.getCacheSize());
        }
        assertEquals(aMeta.getDataCache(), eMeta.getDataCache());
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.datacache.ConcurrentDataCache

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.