@Test public void minRemainingQueueCapacity() throws InterruptedException, ExecutionException { int minRemainingQueueCapacity = this.cut.getMinRemainingQueueCapacity(); int remainingCapacity = this.cut.getQueue().remainingCapacity(); assertThat(minRemainingQueueCapacity, is(remainingCapacity)); Future<?> result = null; for (int i = 0; i < QUEUE_CAPACITY * 2; i++) { result = this.cut.submit(blockingFor(100)); } result.get(); assertThat(this.cut.getMinRemainingQueueCapacity(), is(0)); }
public int getMinRemainingQueueCapacity() { return minRemainingQueueCapacity; }
InstrumentedThreadPoolExecutor extends ThreadPoolExecutor { public int getMinRemainingQueueCapacity() { return minRemainingQueueCapacity; } }
InstrumentedThreadPoolExecutor extends ThreadPoolExecutor { public int getMinRemainingQueueCapacity() { return minRemainingQueueCapacity; } InstrumentedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); }
InstrumentedThreadPoolExecutor extends ThreadPoolExecutor { public int getMinRemainingQueueCapacity() { return minRemainingQueueCapacity; } InstrumentedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); int getMinRemainingQueueCapacity(); }
InstrumentedThreadPoolExecutor extends ThreadPoolExecutor { public int getMinRemainingQueueCapacity() { return minRemainingQueueCapacity; } InstrumentedThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); int getMinRemainingQueueCapacity();  }