java.util.concurrent.LinkedBlockingQueue.retainAll()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(125)

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

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
}

相关文章

微信公众号

最新文章

更多