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

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

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

Ehcache.removeAll介绍

[英]Removes all cached items.

When using Terracotta clustered caches with nonstop enabled, the timeout used by this method is NonstopConfiguration#getBulkOpsTimeoutMultiplyFactor() times the timeout value in the nonstop config.
[中]删除所有缓存项。
使用启用了非停止的Terracotta群集缓存时,此方法使用的超时为非停止配置#getBulkOpsTimeoutMultiplyFactor()乘以非停止配置中的超时值。

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public void clear() {
  this.cache.removeAll();
}

代码示例来源:origin: gocd/gocd

public void clear() {
  ehCache.removeAll();
}

代码示例来源:origin: spring-projects/spring-security

public void clearCache() {
    cache.removeAll();
  }
}

代码示例来源:origin: org.springframework/spring-context-support

@Override
public void clear() {
  this.cache.removeAll();
}

代码示例来源:origin: apache/kylin

public void clear() {
  this.cache.removeAll();
}

代码示例来源:origin: spring-projects/spring-security

protected Ehcache getCache() {
  Ehcache cache = cacheManager.getCache("basiclookuptestcache");
  cache.removeAll();
  return cache;
}

代码示例来源:origin: spring-projects/spring-security

private Ehcache getCache() {
  Ehcache cache = cacheManager.getCache("ehcacheusercachetests");
  cache.removeAll();
  return cache;
}

代码示例来源:origin: apache/shiro

/**
 * Removes all elements in the cache, but leaves the cache in a useable state.
 */
public void clear() throws CacheException {
  if (log.isTraceEnabled()) {
    log.trace("Clearing all objects from cache [" + cache.getName() + "]");
  }
  try {
    cache.removeAll();
  } catch (Throwable t) {
    throw new CacheException(t);
  }
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void clearCache() throws Exception {
  myCache.clearCache();
  verify(cache).removeAll();
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
public void evictData() {
  try {
    getCache().removeAll();
  }
  catch (IllegalStateException e) {
    throw new CacheException( e );
  }
  catch (net.sf.ehcache.CacheException e) {
    if ( e instanceof NonStopCacheException ) {
      HibernateNonstopCacheExceptionHandler.getInstance()
          .handleNonstopCacheException( (NonStopCacheException) e );
    }
    else {
      throw new CacheException( e );
    }
  }
}

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

/**
 * {@inheritDoc}
 */
public void removeAll(Collection<?> keys) throws IllegalStateException {
  underlyingCache.removeAll(keys);
}

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

/**
 * {@inheritDoc}
 */
public void removeAll() throws IllegalStateException, CacheException {
  underlyingCache.removeAll();
}

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

/**
 * {@inheritDoc}
 */
public void removeAll(boolean doNotNotifyCacheReplicators) throws IllegalStateException, CacheException {
  underlyingCache.removeAll(doNotNotifyCacheReplicators);
}

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

/**
 * {@inheritDoc}
 */
public void removeAll(Collection<?> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
  underlyingCache.removeAll(keys, doNotNotifyCacheReplicators);
}

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

/**
* {@inheritDoc}
*/
public void removeAll(boolean arg0) throws IllegalStateException, CacheException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.removeAll(arg0);
  } finally {
    t.setContextClassLoader(prev);
  }
}

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

/**
* {@inheritDoc}
*/
public void removeAll(Collection arg0, boolean arg1) throws IllegalStateException, NullPointerException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.removeAll(arg0, arg1);
  } finally {
    t.setContextClassLoader(prev);
  }
}

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

/**
 * Removes all cached items.
 *
 * @throws IllegalStateException if the cache is not {@link net.sf.ehcache.Status#STATUS_ALIVE}
 */
public void removeAll() throws RemoteException, IllegalStateException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("RMICachePeer for cache " + cache.getName() + ": remote removeAll received");
  }
  cache.removeAll(true);
}

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

/**
 * Remove all elements in the cache, but leave the cache in a useable state.
 *
 * @throws CacheException
 */
public final void clear() throws CacheException {
  try {
    cache.removeAll();
  } catch (IllegalStateException e) {
    throw new CacheException(e);
  }
}

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

/**
 * Removes all cached items.
*
* @throws IllegalStateException if the cache is not {@link net.sf.ehcache.Status#STATUS_ALIVE}
*/
public void removeAll() throws IllegalStateException, CacheException {
  CacheTransactionHelper.beginTransactionIfNeeded(cache);
  try {
    cache.removeAll();
  } finally {
    CacheTransactionHelper.commitTransactionIfNeeded(cache);
  }
}

代码示例来源:origin: gocd/gocd

public static void clearSingletons() {
    AnalyticsMetadataStore.instance().clear();
    ArtifactMetadataStore.instance().clear();
    AuthorizationMetadataStore.instance().clear();
    ConfigRepoMetadataStore.instance().clear();
    ElasticAgentMetadataStore.instance().clear();
    NewSCMMetadataStore.instance().clear();
    NotificationMetadataStore.instance().clear();
    PackageMaterialMetadataStore.instance().clear();
    PluggableTaskMetadataStore.instance().clear();

    new CachingSubjectDnX509PrincipalExtractor().getCache().removeAll();

    //
    SessionUtils.unsetCurrentUser();

    //
    PackageMetadataStore.getInstance().clear();
    PluggableTaskConfigStore.store().clear();
    PluginSettingsMetadataStore.getInstance().clear();
    RepositoryMetadataStore.getInstance().clear();
    SCMMetadataStore.getInstance().clear();
  }
}

相关文章

Ehcache类方法