Package org.castor.cache

Examples of org.castor.cache.CacheFactory


        CacheFactory cf = new GigaspacesCacheFactory();
        assertEquals("gigaspaces", cf.getCacheType());
    }

    public void testGetCacheClassName() {
        CacheFactory cf = new GigaspacesCacheFactory();
        String classname = "org.castor.cache.distributed.GigaspacesCache";
        assertEquals(classname, cf.getCacheClassName());
    }
View Full Code Here


        String classname = "org.castor.cache.distributed.GigaspacesCache";
        assertEquals(classname, cf.getCacheClassName());
    }

    public void testGetCache() {
        CacheFactory cf = new GigaspacesCacheFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof GigaspacesCache);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of GigaspacesCache from factroy");
        }
    }
View Full Code Here

    }

    public TestJCacheFactory(final String name) { super(name); }

    public void testConstructor() {
        CacheFactory cf = new JCacheFactory();
        assertTrue(cf instanceof JCacheFactory);
    }
View Full Code Here

        CacheFactory cf = new JCacheFactory();
        assertTrue(cf instanceof JCacheFactory);
    }

    public void testGetCacheType() {
        CacheFactory cf = new JCacheFactory();
        assertEquals("jcache", cf.getCacheType());
    }
View Full Code Here

        CacheFactory cf = new JCacheFactory();
        assertEquals("jcache", cf.getCacheType());
    }

    public void testGetCacheClassName() {
        CacheFactory cf = new JCacheFactory();
        String classname = "org.castor.cache.distributed.JCache";
        assertEquals(classname, cf.getCacheClassName());
    }
View Full Code Here

        String classname = "org.castor.cache.distributed.JCache";
        assertEquals(classname, cf.getCacheClassName());
    }

    public void testGetCache() {
        CacheFactory cf = new JCacheFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof JCache);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of JCache from factroy");
        }
    }
View Full Code Here

            fail("Failed to get instance of JCache from factroy");
        }
    }

    public void testShutdown() {
        CacheFactory cf = new JCacheFactory();
        int counter = DistributedCacheFactoryMock.getCounter();
       
        DistributedCacheFactoryMock.setException(null);
        cf.shutdown();
        assertEquals(counter, DistributedCacheFactoryMock.getCounter());
    }
View Full Code Here

    }

    public TestCoherenceCacheFactory(final String name) { super(name); }

    public void testConstructor() {
        CacheFactory cf = new CoherenceCacheFactory();
        assertTrue(cf instanceof CoherenceCacheFactory);
    }
View Full Code Here

        CacheFactory cf = new CoherenceCacheFactory();
        assertTrue(cf instanceof CoherenceCacheFactory);
    }

    public void testGetCacheType() {
        CacheFactory cf = new CoherenceCacheFactory();
        assertEquals("coherence", cf.getCacheType());
    }
View Full Code Here

        CacheFactory cf = new CoherenceCacheFactory();
        assertEquals("coherence", cf.getCacheType());
    }

    public void testGetCacheClassName() {
        CacheFactory cf = new CoherenceCacheFactory();
        String classname = "org.castor.cache.distributed.CoherenceCache";
        assertEquals(classname, cf.getCacheClassName());
    }
View Full Code Here

TOP

Related Classes of org.castor.cache.CacheFactory

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.