Package org.apache.chemistry.opencmis.client.bindings.cache

Examples of org.apache.chemistry.opencmis.client.bindings.cache.Cache.initialize()


        Cache cache;

        // empty config
        try {
            cache = new CacheImpl();
            cache.initialize(new String[] {});
        } catch (IllegalArgumentException e) {
        }

        // null config
        try {
View Full Code Here


        }

        // null config
        try {
            cache = new CacheImpl();
            cache.initialize(null);
        } catch (IllegalArgumentException e) {
        }

        // unknown class
        try {
View Full Code Here

        }

        // unknown class
        try {
            cache = new CacheImpl();
            cache.initialize(new String[] { "this.is.not.a.valid.class" });
        } catch (IllegalArgumentException e) {
        }

        // not a CacheLevel class
        try {
View Full Code Here

        }

        // not a CacheLevel class
        try {
            cache = new CacheImpl();
            cache.initialize(new String[] { "org.apache.chemistry.opencmis.client.provider.cache.CacheTest" });
        } catch (IllegalArgumentException e) {
        }
    }

    public void testMapCache() throws Exception {
View Full Code Here

    public void testMapCache() throws Exception {
        Cache cache;

        cache = new CacheImpl();
        cache.initialize(new String[] { MAP_CACHE_LEVEL + " " + MapCacheLevelImpl.CAPACITY + "=10,"
                + MapCacheLevelImpl.LOAD_FACTOR + "=0.5" });

        for (int i = 0; i < 100; i++) {
            cache.put("value" + i, "key" + i);
        }
View Full Code Here

    public void testURLCache() throws Exception {
        Cache cache;

        cache = new CacheImpl();
        cache.initialize(new String[] { LRU_CACHE_LEVEL + " " + LruCacheLevelImpl.MAX_ENTRIES + "=10" });

        for (int i = 0; i < 100; i++) {
            cache.put("value" + i, "key" + i);
        }
View Full Code Here

    public void XtestFallback() throws Exception {
        Cache cache;

        cache = new CacheImpl();
        cache.initialize(new String[] { MAP_CACHE_LEVEL + " " + MapCacheLevelImpl.CAPACITY + "=10,"
                + MapCacheLevelImpl.LOAD_FACTOR + "=0.5" });

        cache.put("value1", new String[] { null });
        cache.put("value2", "key2");
View Full Code Here

    public void testCache() throws Exception {
        Cache cache;

        cache = new CacheImpl();
        cache.initialize(new String[] { MAP_CACHE_LEVEL, LRU_CACHE_LEVEL, MAP_CACHE_LEVEL, MAP_CACHE_LEVEL });

        String value1 = "value1";
        String value2 = "value2";
        String value3 = "value3";
        Object valueObj;
View Full Code Here

    public void testCacheBadUsage() throws Exception {
        Cache cache;

        cache = new CacheImpl();
        cache.initialize(new String[] { MAP_CACHE_LEVEL, LRU_CACHE_LEVEL, MAP_CACHE_LEVEL, MAP_CACHE_LEVEL });

        // insufficient number of keys
        try {
            cache.put("value", "l1", "l2", "l3");
        } catch (IllegalArgumentException e) {
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.