@Override public void shutdownNow() { fjPool().shutdownNow(); } }
@Override public int getActiveThreadCount() { return fjPool().getActiveThreadCount(); }
@Override public int getRunningThreadCount() { return fjPool().getRunningThreadCount(); }
@Override public int getQueuedSubmissionCount() { return fjPool().getQueuedSubmissionCount(); }
@Override public long getStealCount() { return fjPool().getStealCount(); }
@Override public void shutdown() { fjPool().shutdown(); }
@Override public boolean getAsyncMode() { return fjPool().getAsyncMode(); // Returns true if this pool uses local first-in-first-out scheduling mode for forked tasks that are never joined. }
@Override public void shutdownNow() { fjPool().shutdownNow(); }
@Override public long getQueuedTaskCount() { return fjPool().getQueuedTaskCount(); }
@Override public void shutdown() { fjPool().shutdown(); }
@Override public boolean getAsyncMode() { return fjPool().getAsyncMode(); // Returns true if this pool uses local first-in-first-out scheduling mode for forked tasks that are never joined. }
@Override public int getParallelism() { return fjPool().getParallelism(); // Returns the targeted parallelism level of this pool. }
@Override public int getPoolSize() { return fjPool().getPoolSize(); // Returns the number of worker threads that have started but not yet terminated. }
@Override public int getParalellism() { return fjPool().getParallelism(); // Returns the targeted parallelism level of this pool. }
@Override public int getPoolSize() { return fjPool().getPoolSize(); // Returns the number of worker threads that have started but not yet terminated. }
@Override public long[] getLatency() { return new ExecutorServiceLatencyProbe(fjPool(), 5).fire(); }
@Override public ForkJoinPoolMonitor.Status getStatus() { final ForkJoinPool fjPool = fjPool(); if (fjPool.isTerminated()) // Returns true if all tasks have completed following shut down. return ForkJoinPoolMonitor.Status.TERMINATED; if (fjPool.isTerminating()) // Returns true if the process of termination has commenced but not yet completed. return ForkJoinPoolMonitor.Status.TERMINATING; if (fjPool.isShutdown()) // Returns true if this pool has been shut down. return ForkJoinPoolMonitor.Status.SHUTDOWN; if (fjPool.isQuiescent()) // Returns true if all worker threads are currently idle. return ForkJoinPoolMonitor.Status.QUIESCENT; return ForkJoinPoolMonitor.Status.ACTIVE; }
@Override public Status getStatus() { final ForkJoinPool fjPool = fjPool(); if (fjPool.isTerminated()) // Returns true if all tasks have completed following shut down. return Status.TERMINATED; if (fjPool.isTerminating()) // Returns true if the process of termination has commenced but not yet completed. return Status.TERMINATING; if (fjPool.isShutdown()) // Returns true if this pool has been shut down. return Status.SHUTDOWN; if (fjPool.isQuiescent()) // Returns true if all worker threads are currently idle. return Status.QUIESCENT; return Status.ACTIVE; }
@Override public ForkJoinInfo getInfo() { final ForkJoinPool fjPool = fjPool(); int activeThreadCount = fjPool.getActiveThreadCount(); // Returns an estimate of the number of threads that are currently stealing or executing tasks. int runningThreadCount = fjPool.getRunningThreadCount(); // Returns an estimate of the number of worker threads that are not blocked waiting to join tasks or for other managed synchronization. int queuedSumbmissionCount = fjPool.getQueuedSubmissionCount(); // Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing. long queuedTaskCount = fjPool.getQueuedTaskCount(); // Returns an estimate of the total number of tasks currently held in queues by worker threads (but not including tasks submitted to the pool that have not begun executing). long stealCount = fjPool.getStealCount(); // Returns an estimate of the total number of tasks stolen from one thread's work queue by another. return new ForkJoinInfo(activeThreadCount, runningThreadCount, queuedSumbmissionCount, queuedTaskCount, stealCount); }
@Override public ForkJoinInfo getInfo() { final ForkJoinPool fjPool = fjPool(); int activeThreadCount = fjPool.getActiveThreadCount(); // Returns an estimate of the number of threads that are currently stealing or executing tasks. int runningThreadCount = fjPool.getRunningThreadCount(); // Returns an estimate of the number of worker threads that are not blocked waiting to join tasks or for other managed synchronization. int queuedSumbmissionCount = fjPool.getQueuedSubmissionCount(); // Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing. long queuedTaskCount = fjPool.getQueuedTaskCount(); // Returns an estimate of the total number of tasks currently held in queues by worker threads (but not including tasks submitted to the pool that have not begun executing). long stealCount = fjPool.getStealCount(); // Returns an estimate of the total number of tasks stolen from one thread's work queue by another. return new ForkJoinInfo(activeThreadCount, runningThreadCount, queuedSumbmissionCount, queuedTaskCount, stealCount); }