本文整理了Java中java.util.concurrent.LinkedBlockingQueue.retainAll()
方法的一些代码示例,展示了LinkedBlockingQueue.retainAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkedBlockingQueue.retainAll()
方法的具体详情如下:
包路径:java.util.concurrent.LinkedBlockingQueue
类名称:LinkedBlockingQueue
方法名:retainAll
暂无
代码示例来源:origin: jankotek/mapdb
/**
* retainAll(c) retains only those elements of c and reports true if changed
*/
public void testRetainAll() {
LinkedBlockingQueue q = populatedQueue(SIZE);
LinkedBlockingQueue p = populatedQueue(SIZE);
for (int i = 0; i < SIZE; ++i) {
boolean changed = q.retainAll(p);
if (i == 0)
assertFalse(changed);
else
assertTrue(changed);
assertTrue(q.containsAll(p));
assertEquals(SIZE - i, q.size());
p.remove();
}
}
代码示例来源:origin: rhq-project/rhq
public boolean retainAll(Collection<?> c) {
return m_queue.retainAll(c); // bypasses throttle
}
代码示例来源:origin: davidB/metrics-influxdb
public boolean retainAll(Collection<?> c) {
return delegate.retainAll(c);
}
代码示例来源:origin: sentilo/sentilo
public boolean retainAll(final Collection<?> c) {
return blockingQueue.retainAll(c);
}
代码示例来源:origin: org.rhq/rhq-enterprise-comm
public boolean retainAll(Collection<?> c) {
return m_queue.retainAll(c); // bypasses throttle
}
内容来源于网络,如有侵权,请联系作者删除!