java.util.concurrent.locks.ReentrantLock.getQueuedThreads()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(175)

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

ReentrantLock.getQueuedThreads介绍

[英]Returns a collection containing threads that may be waiting to acquire this lock. Because the actual set of threads may change dynamically while constructing this result, the returned collection is only a best-effort estimate. The elements of the returned collection are in no particular order. This method is designed to facilitate construction of subclasses that provide more extensive monitoring facilities.
[中]返回一个集合,其中包含可能正在等待获取此锁的线程。因为在构造这个结果时,实际的线程集可能会动态变化,所以返回的集合只是一个尽力而为的估计。返回集合的元素没有特定的顺序。该方法旨在促进提供更广泛监控设施的子类的构建。

代码示例

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

@Override
public Collection<Thread> getQueuedThreads() { // NOSONAR
  return super.getQueuedThreads();
}

代码示例来源:origin: org.jboss.genericjms/generic-jms-ra-jar

/**
   * {@inheritDoc}
   */
  public Collection<Thread> getQueuedThreads() {
    return super.getQueuedThreads();
  }
}

代码示例来源:origin: org.axonframework/axon-core

@Override
public Collection<Thread> getQueuedThreads() { // NOSONAR
  return super.getQueuedThreads();
}

代码示例来源:origin: org.axonframework/axon-messaging

@Override
public Collection<Thread> getQueuedThreads() { // NOSONAR
  return super.getQueuedThreads();
}

相关文章