How to monitor queue size of a thread pool
Michal Singer <[email protected]> Mon, 8 Feb 2010 21:56:29 -0800 (PST)
| Newsgroups | gmane.comp.java.springframework.user |
|---|---|
| Message-ID | <[email protected]> |
hi. i am trying to check out during runtime, the queue of waiting tasks of a thread pool. I am using org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor and calling this: ThreadPoolTaskExecutor.getThreadPoolExecutor().getQueue().size() But it returns the pool size (ThreadPoolTaskExecutor.getPoolSize()) and not the queue size (which should be different where pool size is the threads which are available to run and queue size is the tasks waiting to be executed in those threads. ) Anybody knows how to extarct this information? (the TaskCount minus Completed task count) Thanks, Michal -- View this message in context: http://old.nabble.com/How-to-monitor-queue-size-of-a-thread-pool-tp27510780p27510780.html Sent from the springframework-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com