本文整理了Java中java.util.concurrent.locks.ReentrantLock.getQueueLength
方法的一些代码示例,展示了ReentrantLock.getQueueLength
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReentrantLock.getQueueLength
方法的具体详情如下:
包路径:java.util.concurrent.locks.ReentrantLock
类名称:ReentrantLock
方法名:getQueueLength
[英]Returns an estimate of the number of threads waiting to acquire this lock. The value is only an estimate because the number of threads may change dynamically while this method traverses internal data structures. This method is designed for use in monitoring of the system state, not for synchronization control.
[中]返回等待获取此锁的线程数的估计值。该值只是一个估计值,因为当该方法遍历内部数据结构时,线程的数量可能会动态变化。该方法设计用于监控系统状态,而不是同步控制。
代码示例来源:origin: google/guava
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: alibaba/druid
public int getLockQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: prestodb/presto
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: google/j2objc
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: NLPchina/elasticsearch-sql
public int getLockQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: wildfly/wildfly
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: kiegroup/jbpm
protected void createLockOnGetEngine(Long id, RuntimeEngine runtime) {
if (!isUseLocking()) {
logger.debug("Locking on runtime manager disabled");
return;
}
if (id != null) {
ReentrantLock newLock = new ReentrantLock();
ReentrantLock lock = engineLocks.putIfAbsent(id, newLock);
if (lock == null) {
lock = newLock;
logger.debug("New lock created as it did not exist before");
} else {
logger.debug("Lock exists with {} waiting threads", lock.getQueueLength());
}
logger.debug("Trying to get a lock {} for {} by {}", lock, id, runtime);
lock.lock();
logger.debug("Lock {} taken for {} by {} for waiting threads by {}", lock, id, runtime, lock.hasQueuedThreads());
}
}
代码示例来源:origin: NLPchina/elasticsearch-sql
connectErrorCount.incrementAndGet();
throw new SQLException("maxWaitThreadCount " + maxWaitThreadCount + ", current wait Thread count "
+ lock.getQueueLength());
代码示例来源:origin: alibaba/druid
connectErrorCountUpdater.incrementAndGet(this);
throw new SQLException("maxWaitThreadCount " + maxWaitThreadCount + ", current wait Thread count "
+ lock.getQueueLength());
代码示例来源:origin: com.alibaba/druid
public int getLockQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: com.alibaba/druid
connectErrorCountUpdater.incrementAndGet(this);
throw new SQLException("maxWaitThreadCount " + maxWaitThreadCount + ", current wait Thread count "
+ lock.getQueueLength());
代码示例来源:origin: org.apache.hbase.thirdparty/hbase-shaded-miscellaneous
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: blazegraph/database
/**
* The #of threads queued on the internal {@link #lock}. These are (for the
* most part) threads waiting to start or stop during a group commit.
* However, you can not use this measure to infer whether there are threads
* waiting to run which are being starved during a group commit or simply
* threads waiting to do their post-processing.
*/
public int getInternalLockQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: org.sonatype.sisu/sisu-guava
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: com.atlassian.guava/guava
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: org.testifyproject.external/external-guava
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: io.prestosql/presto-jdbc
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Returns an estimate of the number of threads waiting to enter this monitor. The value is only
* an estimate because the number of threads may change dynamically while this method traverses
* internal data structures. This method is designed for use in monitoring of the system state,
* not for synchronization control.
*/
public int getQueueLength() {
return lock.getQueueLength();
}
内容来源于网络,如有侵权,请联系作者删除!