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

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

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

Ehcache.dispose介绍

[英]Flushes all cache items from memory to auxilliary caches and close the auxilliary caches.

Should be invoked only by CacheManager.
[中]将所有缓存项从内存刷新到辅助缓存,并关闭辅助缓存。
应仅由CacheManager调用。

代码示例

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  5. underlyingCache.dispose();
  6. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  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.dispose();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

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

  1. /**
  2. * Remove a cache from the CacheManager. The cache is disposed of.
  3. *
  4. * @param cacheName
  5. * the cache name
  6. * @throws IllegalStateException
  7. * if the cache is not {@link Status#STATUS_ALIVE}
  8. */
  9. public synchronized void removeCache(String cacheName) throws IllegalStateException {
  10. checkStatus();
  11. // NPE guard
  12. if (cacheName == null || cacheName.length() == 0) {
  13. return;
  14. }
  15. Ehcache cache = ehcaches.remove(cacheName);
  16. if (cache != null && cache.getStatus().equals(Status.STATUS_ALIVE)) {
  17. cache.dispose();
  18. runtimeCfg.removeCache(cache.getCacheConfiguration());
  19. cacheManagerEventListenerRegistry.notifyCacheRemoved(cache.getName());
  20. }
  21. }

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

  1. cache.dispose();
  2. defaultCache.dispose();

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  5. underlyingCache.dispose();
  6. }

代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core

  1. public void stop() {
  2. if (!preconfiguredCache) {
  3. cache.dispose();
  4. }
  5. }

代码示例来源:origin: ehcache/ehcache-jcache

  1. void shutdown() {
  2. closed = true;
  3. ehcache.dispose();
  4. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  5. underlyingCache.dispose();
  6. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  5. underlyingCache.dispose();
  6. }

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

  1. /**
  2. * Flushes all cache items from memory to auxilliary caches and close the auxilliary caches.
  3. * <p/>
  4. * Should be invoked only by CacheManager.
  5. *
  6. * @throws IllegalStateException
  7. * if the cache is not {@link net.sf.ehcache.Status#STATUS_ALIVE}
  8. */
  9. public void dispose() throws IllegalStateException {
  10. cache.dispose();
  11. }

代码示例来源:origin: org.ehcache/jcache

  1. void shutdown() {
  2. closed = true;
  3. ehcache.dispose();
  4. }

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

  1. @Override
  2. public void close() {
  3. this.cache.dispose();
  4. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  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.dispose();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public void dispose() throws IllegalStateException {
  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.dispose();
  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 dispose() throws IllegalStateException {
  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.dispose();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: com.madgag/mini-git-server-server

  1. public void dispose() throws IllegalStateException {
  2. self().dispose();
  3. }

代码示例来源:origin: rtyley/mini-git-server

  1. public void dispose() throws IllegalStateException {
  2. self().dispose();
  3. }

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

  1. /**
  2. * Remove a cache from the CacheManager. The cache is disposed of.
  3. *
  4. * @param cacheName
  5. * the cache name
  6. * @throws IllegalStateException
  7. * if the cache is not {@link Status#STATUS_ALIVE}
  8. */
  9. public synchronized void removeCache(String cacheName) throws IllegalStateException {
  10. checkStatus();
  11. // NPE guard
  12. if (cacheName == null || cacheName.length() == 0) {
  13. return;
  14. }
  15. Ehcache cache = ehcaches.remove(cacheName);
  16. if (cache != null && cache.getStatus().equals(Status.STATUS_ALIVE)) {
  17. cache.dispose();
  18. runtimeCfg.removeCache(cache.getCacheConfiguration());
  19. cacheManagerEventListenerRegistry.notifyCacheRemoved(cache.getName());
  20. }
  21. }

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

  1. /**
  2. * Remove a cache from the CacheManager. The cache is disposed of.
  3. *
  4. * @param cacheName
  5. * the cache name
  6. * @throws IllegalStateException
  7. * if the cache is not {@link Status#STATUS_ALIVE}
  8. */
  9. public synchronized void removeCache(String cacheName) throws IllegalStateException {
  10. checkStatus();
  11. // NPE guard
  12. if (cacheName == null || cacheName.length() == 0) {
  13. return;
  14. }
  15. Ehcache cache = ehcaches.remove(cacheName);
  16. if (cache != null && cache.getStatus().equals(Status.STATUS_ALIVE)) {
  17. cache.dispose();
  18. runtimeCfg.removeCache(cache.getCacheConfiguration());
  19. cacheManagerEventListenerRegistry.notifyCacheRemoved(cache.getName());
  20. }
  21. }

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

  1. /**
  2. * Remove a cache from the CacheManager. The cache is disposed of.
  3. *
  4. * @param cacheName
  5. * the cache name
  6. * @throws IllegalStateException
  7. * if the cache is not {@link Status#STATUS_ALIVE}
  8. */
  9. public synchronized void removeCache(String cacheName) throws IllegalStateException {
  10. checkStatus();
  11. // NPE guard
  12. if (cacheName == null || cacheName.length() == 0) {
  13. return;
  14. }
  15. Ehcache cache = ehcaches.remove(cacheName);
  16. if (cache != null && cache.getStatus().equals(Status.STATUS_ALIVE)) {
  17. cache.dispose();
  18. runtimeCfg.removeCache(cache.getCacheConfiguration());
  19. cacheManagerEventListenerRegistry.notifyCacheRemoved(cache.getName());
  20. }
  21. }

相关文章

Ehcache类方法