本文整理了Java中net.sf.ehcache.Ehcache.registerCacheLoader()
方法的一些代码示例,展示了Ehcache.registerCacheLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.registerCacheLoader()
方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:registerCacheLoader
[英]Register a CacheLoader with the cache. It will then be tied into the cache lifecycle.
The CacheLoader instance will be initialized when the cache itself is being initialized. Should the cache already be initialized, net.sf.ehcache.loader.CacheLoader#init will not be invoked. If the loader requires initialization, the user will have to call it manually before registering it with a Cache instance that's already alive
[中]在缓存中注册缓存加载程序。然后,它将绑定到缓存生命周期中。
缓存加载程序实例将在缓存本身初始化时初始化。如果缓存已经初始化,请使用net。旧金山。ehcache。加载器。不会调用CacheLoader#init。如果加载程序需要初始化,则用户必须在向已处于活动状态的缓存实例注册它之前手动调用它
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader cacheLoader) {
underlyingCache.registerCacheLoader(cacheLoader);
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.registerCacheLoader(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* A factory method to register cache Loaders
*
* @param cacheConfiguration the cache configuration
* @param cache the cache
* @param loader
*/
private static void registerCacheLoaders(CacheConfiguration cacheConfiguration, Ehcache cache, ClassLoader loader) {
List cacheLoaderConfigurations = cacheConfiguration.getCacheLoaderConfigurations();
for (Object cacheLoaderConfiguration : cacheLoaderConfigurations) {
CacheConfiguration.CacheLoaderFactoryConfiguration factoryConfiguration =
(CacheConfiguration.CacheLoaderFactoryConfiguration) cacheLoaderConfiguration;
CacheLoader cacheLoader = createCacheLoader(factoryConfiguration, cache, loader);
cache.registerCacheLoader(cacheLoader);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader cacheLoader) {
underlyingCache.registerCacheLoader(cacheLoader);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader cacheLoader) {
underlyingCache.registerCacheLoader(cacheLoader);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader cacheLoader) {
underlyingCache.registerCacheLoader(cacheLoader);
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.registerCacheLoader(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.registerCacheLoader(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public void registerCacheLoader(CacheLoader arg0) {
// THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
Thread t = Thread.currentThread();
ClassLoader prev = t.getContextClassLoader();
t.setContextClassLoader(this.classLoader);
try {
this.cache.registerCacheLoader(arg0);
} finally {
t.setContextClassLoader(prev);
}
}
代码示例来源:origin: rtyley/mini-git-server
public void registerCacheLoader(CacheLoader cacheLoader) {
self().registerCacheLoader(cacheLoader);
}
代码示例来源:origin: com.madgag/mini-git-server-server
public void registerCacheLoader(CacheLoader cacheLoader) {
self().registerCacheLoader(cacheLoader);
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* A factory method to register cache Loaders
*
* @param cacheConfiguration the cache configuration
* @param cache the cache
* @param loader
*/
private static void registerCacheLoaders(CacheConfiguration cacheConfiguration, Ehcache cache, ClassLoader loader) {
List cacheLoaderConfigurations = cacheConfiguration.getCacheLoaderConfigurations();
for (Object cacheLoaderConfiguration : cacheLoaderConfigurations) {
CacheConfiguration.CacheLoaderFactoryConfiguration factoryConfiguration =
(CacheConfiguration.CacheLoaderFactoryConfiguration) cacheLoaderConfiguration;
CacheLoader cacheLoader = createCacheLoader(factoryConfiguration, cache, loader);
cache.registerCacheLoader(cacheLoader);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* A factory method to register cache Loaders
*
* @param cacheConfiguration the cache configuration
* @param cache the cache
*/
private static void registerCacheLoaders(CacheConfiguration cacheConfiguration, Ehcache cache) {
List cacheLoaderConfigurations = cacheConfiguration.getCacheLoaderConfigurations();
for (Object cacheLoaderConfiguration : cacheLoaderConfigurations) {
CacheConfiguration.CacheLoaderFactoryConfiguration factoryConfiguration =
(CacheConfiguration.CacheLoaderFactoryConfiguration) cacheLoaderConfiguration;
CacheLoader cacheLoader = createCacheLoader(factoryConfiguration, cache);
cache.registerCacheLoader(cacheLoader);
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* A factory method to register cache Loaders
*
* @param cacheConfiguration the cache configuration
* @param cache the cache
* @param loader
*/
private static void registerCacheLoaders(CacheConfiguration cacheConfiguration, Ehcache cache, ClassLoader loader) {
List cacheLoaderConfigurations = cacheConfiguration.getCacheLoaderConfigurations();
for (Object cacheLoaderConfiguration : cacheLoaderConfigurations) {
CacheConfiguration.CacheLoaderFactoryConfiguration factoryConfiguration =
(CacheConfiguration.CacheLoaderFactoryConfiguration) cacheLoaderConfiguration;
CacheLoader cacheLoader = createCacheLoader(factoryConfiguration, cache, loader);
cache.registerCacheLoader(cacheLoader);
}
}
代码示例来源:origin: org.apache.camel/camel-cache
cache.registerCacheLoader(loader);
内容来源于网络,如有侵权,请联系作者删除!