本文整理汇总了Java中org.apache.jcs.JCS.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java JCS.getInstance方法的具体用法?Java JCS.getInstance怎么用?Java JCS.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jcs.JCS
的用法示例。
在下文中一共展示了JCS.getInstance方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JCSCache
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public JCSCache(String regionName, java.util.Properties properties) throws CacheException {
try {
region = JCS.getInstance(regionName);
}
catch (org.apache.jcs.access.exception.CacheException e) {
log.error("could not create JCS region", e);
throw new CacheException(e);
}
}
示例2: DataSourceFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public DataSourceFactory(Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例3: InterfaceFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public InterfaceFactory(Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例4: InputFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public InputFactory( Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例5: SearchServiceFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public SearchServiceFactory(Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例6: WidgetFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public WidgetFactory(Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例7: FacetCollectionFactory
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public FacetCollectionFactory(Collection<DataSource> sources, boolean caching) {
_sources = sources;
_caching = caching;
if (_caching) {
try {
_cache = JCS.getInstance("s2sCache");
} catch (CacheException e) {
log.error("Unable to setup JCS cache; caching not enabled.", e);
_caching = false;
}
}
}
示例8: ObjectCacheJCSImpl
import org.apache.jcs.JCS; //导入方法依赖的package包/类
/**
* Constructor used by the {@link ObjectCacheJCSPerClassImpl}
*/
public ObjectCacheJCSImpl(String name)
{
regionName = (name != null ? name : DEFAULT_REGION);
try
{
jcsCache = JCS.getInstance(regionName);
}
catch(Exception e)
{
throw new RuntimeCacheException("Can't instantiate JCS ObjectCacheImplementation", e);
}
}
示例9: JCSCache
import org.apache.jcs.JCS; //导入方法依赖的package包/类
public JCSCache() {
try {
cache = JCS.getInstance("OUR_REGION");
} catch (CacheException e) {
e.printStackTrace();
}
}
示例10: setUp
import org.apache.jcs.JCS; //导入方法依赖的package包/类
protected void setUp()
throws Exception
{
super.setUp();
org.apache.jcs.JCS.setConfigFilename( "/TestThrash.ccf" );
jcs = JCS.getInstance( "testcache" );
}
示例11: initCacheManager
import org.apache.jcs.JCS; //导入方法依赖的package包/类
/**
* 初始化缓存管理器
*
* @throws CacheException
* 缓存异常
*/
public static void initCacheManager() throws CacheException {
CacheManager.cache = JCS.getInstance(CACHE_REGION_NAME);
}