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

x33g5p2x  于2022-01-18 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(150)

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

Cache.removeAllInternal介绍

[英]Removes or expires a collection of Elements from the Cache after an attempt to get it determined that it should be expired. This also removes it from any stores it may be in.

Also notifies the CacheEventListener after the element has expired.

Synchronization is handled within the method.

If a removeAll was called, listeners are notified, regardless of whether the element existed or not. This allows distributed cache listeners to remove elements from a cluster regardless of whether they existed locally.

Caches which use synchronous replication can throw RemoteCacheException here if the replication to the cluster fails. This exception should be caught in those circumstances.
[中]在尝试获取缓存中的元素集合并确定其应过期后,从缓存中移除该集合或使其过期。这也会将其从任何存储中删除。
还将在元素过期后通知CacheEventListener。
同步是在方法中处理的。
如果调用了removeAll,则无论元素是否存在,都会通知侦听器。这允许分布式缓存侦听器从集群中删除元素,而不管它们是否存在于本地。
如果到群集的复制失败,则使用同步复制的缓存可以在此处引发RemoteCacheException。在这些情况下,应抓住这一例外。

代码示例

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

/**
 * {@inheritDoc}
*/
public final void removeAll(final Collection<?> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
  removeAllInternal(keys, false, true, doNotNotifyCacheReplicators);
}

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

/**
 * {@inheritDoc}
*/
public final void removeAll(final Collection<?> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
  removeAllInternal(keys, false, true, doNotNotifyCacheReplicators);
}

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

/**
 * {@inheritDoc}
*/
public final void removeAll(final Collection<?> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
  removeAllInternal(keys, false, true, doNotNotifyCacheReplicators);
}

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

/**
 * {@inheritDoc}
*/
public final void removeAll(final Collection<?> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
  removeAllInternal(keys, false, true, doNotNotifyCacheReplicators);
}

相关文章

Cache类方法