net.sf.ehcache.Ehcache.setName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(188)

本文整理了Java中net.sf.ehcache.Ehcache.setName()方法的一些代码示例,展示了Ehcache.setName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.setName()方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:setName

Ehcache.setName介绍

[英]Sets the cache name which will name.
[中]设置将命名的缓存名称。

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String name) {
  5. underlyingCache.setName(name);
  6. }

代码示例来源:origin: net.sf.ehcache/ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String arg0) {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. this.cache.setName(arg0);
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: net.sf.ehcache/ehcache

  1. private Ehcache cloneDefaultCache(final String cacheName) {
  2. if (defaultCache == null) {
  3. return null;
  4. }
  5. Ehcache cache;
  6. try {
  7. cache = (Ehcache) defaultCache.clone();
  8. } catch (CloneNotSupportedException e) {
  9. throw new CacheException("Failure cloning default cache. Initial cause was " + e.getMessage(), e);
  10. }
  11. if (cache != null) {
  12. cache.setName(cacheName);
  13. }
  14. return cache;
  15. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String name) {
  5. underlyingCache.setName(name);
  6. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String name) {
  5. underlyingCache.setName(name);
  6. }

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String name) {
  5. underlyingCache.setName(name);
  6. }

代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking

  1. /**
  2. * Sets the cache name which will name.
  3. *
  4. * @param name
  5. * the name of the cache. Should not be null.
  6. */
  7. public void setName(String name) {
  8. cache.setName(name);
  9. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String arg0) {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. this.cache.setName(arg0);
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String arg0) {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. this.cache.setName(arg0);
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void setName(String arg0) {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. this.cache.setName(arg0);
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: stackoverflow.com

  1. CacheManager cacheManager = CacheManager.getInstance();
  2. Ehcache cache = new Cache(cacheManager.getConfiguration().getDefaultCacheConfiguration());
  3. cache.setName("cacheName");
  4. cacheManager.addCache(cache);

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. private Ehcache cloneDefaultCache(final String cacheName) {
  2. if (defaultCache == null) {
  3. return null;
  4. }
  5. Ehcache cache;
  6. try {
  7. cache = (Ehcache) defaultCache.clone();
  8. } catch (CloneNotSupportedException e) {
  9. throw new CacheException("Failure cloning default cache. Initial cause was " + e.getMessage(), e);
  10. }
  11. if (cache != null) {
  12. cache.setName(cacheName);
  13. }
  14. return cache;
  15. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. private Ehcache cloneDefaultCache(final String cacheName) {
  2. if (defaultCache == null) {
  3. return null;
  4. }
  5. Ehcache cache;
  6. try {
  7. cache = (Ehcache) defaultCache.clone();
  8. } catch (CloneNotSupportedException e) {
  9. throw new CacheException("Failure cloning default cache. Initial cause was " + e.getMessage(), e);
  10. }
  11. if (cache != null) {
  12. cache.setName(cacheName);
  13. }
  14. return cache;
  15. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. private Ehcache cloneDefaultCache(final String cacheName) {
  2. if (defaultCache == null) {
  3. return null;
  4. }
  5. Ehcache cache;
  6. try {
  7. cache = (Ehcache) defaultCache.clone();
  8. } catch (CloneNotSupportedException e) {
  9. throw new CacheException("Failure cloning default cache. Initial cause was " + e.getMessage(), e);
  10. }
  11. if (cache != null) {
  12. cache.setName(cacheName);
  13. }
  14. return cache;
  15. }

相关文章

Ehcache类方法