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

x33g5p2x  于2022-01-16 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(149)

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

BlockingQueue.size介绍

暂无

代码示例

代码示例来源:origin: PipelineAI/pipeline

/**
 * Current size of {@link BlockingQueue} used by the thread-pool
 * 
 * @return Number
 */
public Number getCurrentQueueSize() {
  return threadPool.getQueue().size();
}

代码示例来源:origin: apache/incubator-dubbo

private void checkQueueLength() {
    if (connectionExecutor.getQueue().size() > queuewarninglimit) {
      logger.warn(new IllegalThreadStateException("connectionordered channel handler `queue size: " + connectionExecutor.getQueue().size() + " exceed the warning limit number :" + queuewarninglimit));
    }
  }
}

代码示例来源:origin: apache/incubator-dubbo

private void checkQueueLength() {
    if (connectionExecutor.getQueue().size() > queuewarninglimit) {
      logger.warn(new IllegalThreadStateException("connectionordered channel handler `queue size: " + connectionExecutor.getQueue().size() + " exceed the warning limit number :" + queuewarninglimit));
    }
  }
}

代码示例来源:origin: SonarSource/sonarqube

@Override
public int getQueueSize() {
 return delegate.getQueue().size();
}

代码示例来源:origin: apache/hbase

/**
 * Returns the current size of the queue containing regions that are
 * processed.
 *
 * @return The current size of the regions queue.
 */
public int getCompactionQueueSize() {
 return longCompactions.getQueue().size() + shortCompactions.getQueue().size();
}

代码示例来源:origin: apache/hbase

@Override
public String toString() {
 return "compactionQueue=(longCompactions="
   + longCompactions.getQueue().size() + ":shortCompactions="
   + shortCompactions.getQueue().size() + ")"
   + ", splitQueue=" + splits.getQueue().size();
}

代码示例来源:origin: alipay/sofa-rpc

@Override
  public Integer value() {
    return threadPoolExecutor.getQueue().size();
  }
});

代码示例来源:origin: alipay/sofa-rpc

@Override
  public Integer value() {
    return threadPoolExecutor.getQueue().size();
  }
});

代码示例来源:origin: apache/hbase

@Override
public int getGeneralQueueLength() {
 return executor.getQueue().size();
}

代码示例来源:origin: apache/hbase

@Override
public int getQueueSize() {
 return pool.getQueue().size();
}

代码示例来源:origin: apache/hbase

@Override
public int getGeneralQueueLength() {
 return executor.getQueue().size() + rsReportExecutor.getQueue().size();
}

代码示例来源:origin: igniterealtime/Openfire

/**
   * Returns the current number of ChannelMessage objects waiting to be processed by
   * the channel.
   *
   * @return the current number of elements in the processing queue.
   */
  public int getQueueSize() {
    return executor.getQueue().size();
  }
}

代码示例来源:origin: apache/ignite

/** {@inheritDoc} */
@Override public int getQueueSize() {
  return exec instanceof ThreadPoolExecutor ? ((ThreadPoolExecutor)exec).getQueue().size() : -1;
}

代码示例来源:origin: apache/hbase

public int getLargeCompactionQueueSize() {
 return longCompactions.getQueue().size();
}

代码示例来源:origin: apache/hbase

public int getSplitQueueSize() {
 return splits.getQueue().size();
}

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

@Override
  public Integer getNumTasksPending() {
    return threadPool.getQueue().size();
  }
}

代码示例来源:origin: apache/hbase

public int getSmallCompactionQueueSize() {
 return shortCompactions.getQueue().size();
}

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

@Override
public int workQueueSize() {
  return executor.getQueue().size();
}

代码示例来源:origin: Netflix/Priam

@Override
  public int getDownloadTasksQueued() {
    return fileDownloadExecutor.getQueue().size();
  }
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

/** log queue status */
private void logQueueStatus() {
  LOG.info("Waiting tasks: high priority: {}, batch: {}", highPriorityExecutor.getQueue().size(), batchExecutor.getQueue().size());
}

相关文章