All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rythmengine.cache.CacheServiceFactory Maven / Gradle / Ivy

Go to download

A strong typed high performance Java Template engine with .Net Razor like syntax

There is a newer version: 1.4.2
Show newest version
package org.rythmengine.cache;

import org.rythmengine.extension.ICacheService;
import org.rythmengine.extension.ICacheServiceFactory;

/**
 * Created with IntelliJ IDEA.
 * User: luog
 * Date: 2/12/13
 * Time: 8:46 AM
 * To change this template use File | Settings | File Templates.
 */
public enum CacheServiceFactory implements ICacheServiceFactory {
    INSTANCE;
    @Override
    public ICacheService get() {
        try {
            Class.forName("net.sf.ehcache.Cache");
            Class factoryClass = (Class)Class.forName("org.rythmengine.cache.EhCacheServiceFactory");
            ICacheServiceFactory fact = factoryClass.newInstance();
            return fact.get();
        } catch (Exception e) {
            // ignore
        }
        return SimpleCacheService.INSTANCE;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy