Re: How to monitor queue size of a thread pool

Lachezar Dobrev <[email protected]> Mon, 1 Feb 2010 17:07:34 +0200
Newsgroups gmane.comp.java.springframework.user
Message-ID <[email protected]>
  ...getQueue().remainingCapacity()

  ???

2010/2/1 Michal Singer <[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-tp27401289p27401289.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
> _______________________________________________
> Springframework-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/springframework-user
>

------------------------------------------------------------------------------
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