Examples of CacheImpl


Examples of com.deadpan_gamez.cache.CacheImpl

  private CacheImpl cacheImpl;
 
  public ApplicationResourcesImpl() {
   
    eventHandler = new EventHandler();
    cacheImpl = new CacheImpl();
  }
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.cache.CacheImpl

    }
  }

  protected void initCache() {
    // 这里以后要改到从conf文件中读取!!!
    this.cacheHandler = new CacheImpl();

  }
View Full Code Here

Examples of com.thimbleware.jmemcached.CacheImpl

        int idle = -1;
        boolean verbose = false;
        MemCacheDaemon.memcachedVersion = "0.1";
        final MemCacheDaemon<LocalCacheElement> daemon = new MemCacheDaemon<LocalCacheElement>();
        CacheStorage<String, LocalCacheElement> storage = new FSStorage();
        CacheImpl cacheImpl = new CacheImpl(storage);
        daemon.setCache(cacheImpl);
        daemon.setAddr(addr);
        daemon.setBinary(false);
        daemon.setIdleTime(idle);
        daemon.setVerbose(verbose);
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

        int objCount = session.get(SessionParameter.CACHE_SIZE_OBJECTS, CACHE_SIZE_OBJECTS);
        if (objCount < 1) {
            objCount = CACHE_SIZE_OBJECTS;
        }

        fLinkCache = new CacheImpl("Link Cache");
        fLinkCache.initialize(new String[] {
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
                LruCacheLevelImpl.class.getName() + " " + LruCacheLevelImpl.MAX_ENTRIES + "=" + objCount, // id
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=16", // rel
                ContentTypeCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=3,"
                        + MapCacheLevelImpl.SINGLE_VALUE + "=true" // type
        });

        fTypeLinkCache = new CacheImpl("Type Link Cache");
        fTypeLinkCache.initialize(new String[] {
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
                LruCacheLevelImpl.class.getName() + " " + LruCacheLevelImpl.MAX_ENTRIES + "=" + typeCount, // id
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=16", // rel
                ContentTypeCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=3,"
                        + MapCacheLevelImpl.SINGLE_VALUE + "=true"// type
        });

        fCollectionLinkCache = new CacheImpl("Collection Link Cache");
        fCollectionLinkCache.initialize(new String[] {
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=8" // collection
        });

        fTemplateCache = new CacheImpl("URI Template Cache");
        fTemplateCache.initialize(new String[] {
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=6" // type
        });

        fRepositoryLinkCache = new CacheImpl("Repository Link Cache");
        fRepositoryLinkCache.initialize(new String[] {
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
                MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=6" // rel
        });
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    public static final String LRU_CACHE_LEVEL = "org.apache.chemistry.opencmis.client.bindings.cache.impl.LruCacheLevelImpl";

    public void testCache() {
        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";
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    }

    public void testCacheBadUsage() {
        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");
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    public void testCacheConfig() {
        Cache cache;

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

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

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

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

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    }

    public void testMapCache() {
        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

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    }

    public void testURLCache() {
        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

Examples of org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl

    }

    public void XtestFallback() {
        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
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.