Package org.ff4j.cache

Examples of org.ff4j.cache.FeatureStoreCacheProxy


public class InMemoryCacheTest extends AbstractStoreTest {

    /** {@inheritDoc} */
    @Override
    public FeatureStore initStore() {
        return new FeatureStoreCacheProxy(new InMemoryFeatureStore("ff4j.xml"), new InMemoryCacheManager());
    }
View Full Code Here


        new InMemoryCacheManager().put(f);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRequiredArgumentTarget() {
        new FeatureStoreCacheProxy().getTarget();
    }
View Full Code Here

        new FeatureStoreCacheProxy().getTarget();
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRequiredArgumentCacheManager() {
        new FeatureStoreCacheProxy().getCacheManager();
    }
View Full Code Here

        new FeatureStoreCacheProxy().getCacheManager();
    }

    @Test
    public void testExistBis() {
        FeatureStoreCacheProxy fscp = new FeatureStoreCacheProxy();
        fscp.setCacheManager(new InMemoryCacheManager());
        fscp.setTarget(new InMemoryFeatureStore("ff4j.xml"));
        Assert.assertFalse(fscp.exist("toto"));
        Assert.assertFalse(fscp.exist("toto"));
        Assert.assertTrue(fscp.exist("first"));
        Assert.assertTrue(fscp.exist("first"));
    }
View Full Code Here

    private static final FeatureCacheManager cache = new FeatureCacheProviderRedis();

    /** {@inheritDoc} */
    @Override
    protected FeatureStore initStore() {
        return new FeatureStoreCacheProxy(defaultStore, cache);
    }
View Full Code Here

TOP

Related Classes of org.ff4j.cache.FeatureStoreCacheProxy

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.