Examples of copyOnRead()


Examples of net.sf.ehcache.config.CacheConfiguration.copyOnRead()

        CacheConfiguration cfg = new CacheConfiguration(name, maxSize);
        cfg.setClassLoader(cacheManager.getConfiguration().getClassLoader());
        if(configuration.isStoreByValue()) {
            final CopyStrategyConfiguration copyStrategyConfiguration = new CopyStrategyConfiguration();
            copyStrategyConfiguration.setCopyStrategyInstance(new JCacheCopyOnWriteStrategy());
            cfg.copyOnRead(true).copyOnWrite(true)
                .addCopyStrategy(copyStrategyConfiguration);
        }
        if(configuration instanceof CompleteConfiguration) {
            if(((CompleteConfiguration)configuration).isWriteThrough()) {
                cfg.addCacheWriter(new CacheWriterConfiguration().writeMode(CacheWriterConfiguration.WriteMode.WRITE_THROUGH));
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.