本文整理了Java中java.util.concurrent.ConcurrentSkipListSet.removeAll()
方法的一些代码示例,展示了ConcurrentSkipListSet.removeAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListSet.removeAll()
方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListSet
类名称:ConcurrentSkipListSet
方法名:removeAll
[英]Removes from this set all of its elements that are contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.
[中]从此集合中删除指定集合中包含的所有元素。如果指定的集合也是一个集合,则此操作会有效地修改此集合,使其值为两个集合的非对称集合差。
代码示例来源:origin: Alluxio/alluxio
/**
* Removes all buckets in the set.
*
* @param buckets a set of buckets to be removed
*/
public void removeBuckets(Set<TtlBucket> buckets) {
mBucketList.removeAll(buckets);
}
}
代码示例来源:origin: alibaba/jstorm
public void updateWorkerToResource(Set<ResourceWorkerSlot> workers) {
workerToResource.removeAll(workers);
workerToResource.addAll(workers);
}
代码示例来源:origin: org.alluxio/alluxio-core-server-master
/**
* Removes all buckets in the set.
*
* @param buckets a set of buckets to be removed
*/
public void removeBuckets(Set<TtlBucket> buckets) {
mBucketList.removeAll(buckets);
}
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.utils/org.eclipse.scada.utils
@Override
public boolean removeAll ( final Collection<?> c )
{
return this.internalSet.removeAll ( c );
}
代码示例来源:origin: org.tachyonproject/tachyon-servers
/**
* Remove all buckets in the set.
*
* @param buckets a set of buckets to be removed
*/
public void removeBuckets(Set<TTLBucket> buckets) {
mBucketList.removeAll(buckets);
}
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
public void updateWorkerToResource(Set<ResourceWorkerSlot> workers) {
workerToResource.removeAll(workers);
workerToResource.addAll(workers);
}
代码示例来源:origin: com.sap.cloud.s4hana.cloudplatform/core
private int cleanUpOldExceptions()
{
final ZonedDateTime cutoffTime = ZonedDateTime.now().minus(preservationDuration);
final SortedSet<SimpleImmutableEntry<ZonedDateTime, Throwable>> entriesToDelete = getEntriesBefore(cutoffTime);
timestampedThrowables.removeAll(entriesToDelete);
return entriesToDelete.size();
}
代码示例来源:origin: addthis/hydra
tasksToDelete.removeAll(taskSnapshot);
backupsToDelete.removeAll(backupSnapshot);
代码示例来源:origin: pravega/pravega
/**
* This method maintains a sorted list of position for requests currently being processed.
* As processing of each request completes, it is removed from the sorted list and moved to
* completed list.
* Completed is also a sorted list that contains all completed requests greater than smallest running position.
* In other words, we maintain all requests from smallest processing to current position in either running or completed
* sorted list.
* Note: Smallest position will always be in the running list.
* We also maintain a single checkpoint, which is the highest completed position smaller than smallest running position.
*
* @param pc position for which processing completed
*/
@Synchronized
private void checkpoint(PositionCounter pc) {
running.remove(pc);
completed.add(pc);
final PositionCounter smallest = running.isEmpty() ? MAX : running.first();
final List<PositionCounter> checkpointCandidates = completed.stream()
.filter(x -> positionCounterComparator.compare(x, smallest) < 0).collect(Collectors.toList());
if (checkpointCandidates.size() > 0) {
final PositionCounter checkpointPosition = checkpointCandidates.get(checkpointCandidates.size() - 1);
completed.removeAll(checkpointCandidates);
checkpoint.set(checkpointPosition);
}
}
代码示例来源:origin: cojen/Tupl
mTermLogs.removeAll(toDelete);
内容来源于网络,如有侵权,请联系作者删除!