本文整理了Java中net.sf.ehcache.Ehcache.setCacheManager()
方法的一些代码示例,展示了Ehcache.setCacheManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.setCacheManager()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:setCacheManager
[英]Sets the CacheManager
[中]设置缓存管理器
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager cacheManager) {
underlyingCache.setCacheManager(cacheManager);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.setCacheManager(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager cacheManager) {
underlyingCache.setCacheManager(cacheManager);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager cacheManager) {
underlyingCache.setCacheManager(cacheManager);
}
代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking
/**
* Sets the CacheManager
*
* @param cacheManager
* the CacheManager this cache belongs to
*/
public void setCacheManager(CacheManager cacheManager) {
cache.setCacheManager(cacheManager);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager cacheManager) {
underlyingCache.setCacheManager(cacheManager);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Initialize the given {@link Ehcache} without adding it to the {@link CacheManager}.
*
* @param cache
* @param registerCacheConfig
*/
void initializeEhcache(final Ehcache cache, final boolean registerCacheConfig) {
if (!registerCacheConfig) {
cache.getCacheConfiguration().setupFor(this, registerCacheConfig, getParentCacheName(cache));
} else {
cache.getCacheConfiguration().setupFor(this);
}
cache.setCacheManager(this);
cache.setTransactionManagerLookup(transactionManagerLookup);
cache.initialise();
if (!runtimeCfg.allowsDynamicCacheConfig()) {
cache.disableDynamicFeatures();
}
if (!registerCacheConfig) {
associateShadowCache(cache);
}
try {
cache.bootstrap();
} catch (CacheException e) {
LOG.warn("Cache " + cache.getName() + "requested bootstrap but a CacheException occured. " + e.getMessage(), e);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.setCacheManager(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.setCacheManager(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void setCacheManager(CacheManager arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.setCacheManager(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: com.madgag/mini-git-server-server
public void setCacheManager(CacheManager cacheManager) {
self().setCacheManager(cacheManager);
}
代码示例来源:origin: rtyley/mini-git-server
public void setCacheManager(CacheManager cacheManager) {
self().setCacheManager(cacheManager);
}
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
public Cache createCache(FacesContext facesContext, String cacheName, Map<?, ?> env) {
LOG.info("Creating EhCache cache instance");
int maxCacheSize = getIntConfigurationValue(facesContext, CoreConfiguration.Items.resourcesCacheSize);
boolean preconfiguredCache = false;
Ehcache ehcache = cacheManager.getEhcache(cacheName);
if (ehcache == null) {
ehcache = new net.sf.ehcache.Cache(cacheName, maxCacheSize, false, true, 0, 0);
} else {
preconfiguredCache = true;
if (ehcache.getCacheConfiguration().getMaxElementsInMemory() <=0) {
LOG.info(MessageFormat.format("Maximum cache size hasn''t been set, resetting to {0} max items", maxCacheSize));
ehcache.getCacheConfiguration().setMaxElementsInMemory(maxCacheSize);
}
}
ehcache.setCacheManager(cacheManager);
return new EhCacheCache(ehcache, preconfiguredCache);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Initialize the given {@link Ehcache} without adding it to the {@link CacheManager}.
*
* @param cache
* @param registerCacheConfig
*/
void initializeEhcache(final Ehcache cache, final boolean registerCacheConfig) {
if (!registerCacheConfig) {
cache.getCacheConfiguration().setupFor(this, registerCacheConfig, getParentCacheName(cache));
} else {
cache.getCacheConfiguration().setupFor(this);
}
cache.setCacheManager(this);
cache.setTransactionManagerLookup(transactionManagerLookup);
cache.initialise();
if (!runtimeCfg.allowsDynamicCacheConfig()) {
cache.disableDynamicFeatures();
}
if (!registerCacheConfig) {
associateShadowCache(cache);
}
try {
cache.bootstrap();
} catch (CacheException e) {
LOG.warn("Cache " + cache.getName() + "requested bootstrap but a CacheException occured. " + e.getMessage(), e);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Initialize the given {@link Ehcache} without adding it to the {@link CacheManager}.
*
* @param cache
* @param registerCacheConfig
*/
void initializeEhcache(final Ehcache cache, final boolean registerCacheConfig) {
if (!registerCacheConfig) {
cache.getCacheConfiguration().setupFor(this, registerCacheConfig, getParentCacheName(cache));
} else {
cache.getCacheConfiguration().setupFor(this);
}
cache.setCacheManager(this);
cache.setTransactionManagerLookup(transactionManagerLookup);
cache.initialise();
if (!runtimeCfg.allowsDynamicCacheConfig()) {
cache.disableDynamicFeatures();
}
if (!registerCacheConfig) {
associateShadowCache(cache);
}
try {
cache.bootstrap();
} catch (CacheException e) {
LOG.warn("Cache " + cache.getName() + "requested bootstrap but a CacheException occured. " + e.getMessage(), e);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
cache.setCacheManager(this);
cache.setTransactionManagerLookup(transactionManagerLookup);
内容来源于网络,如有侵权,请联系作者删除!