com::pcbsys::nirvana::nAdminAPI::nThreadPool Class Reference

This class is used to represent an instance of a thread pool being used within a Nirvana realm. More...

#include <nThreadPool.h>

Public Member Functions

virtual int getIdle ()
 Get the number of idle threads within the thread pool. More...
 
virtual const std::string & getName ()
 Get the name of this thread pool. More...
 
virtual int getQueue ()
 Get the number of current tasks queued within the thread pool. More...
 
virtual int getSize ()
 Get the size of the pool, i.e. More...
 
virtual longlong getTotal ()
 Get the total number of tasks executed by the thread pool during it's lifetime. More...
 
 nThreadPool (const std::string &name, int size, int idle, int queue, longlong total)
 Constructs a new nThreadPool. More...
 

Detailed Description

This class is used to represent an instance of a thread pool being used within a Nirvana realm.

Each threadpool is known by a name, and has a number of values that can be accessed

See Also
nThreadEntry
Since
4.0

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nThreadPool::nThreadPool ( const std::string &  name,
int  size,
int  idle,
int  queue,
longlong  total 
)

Constructs a new nThreadPool.

Parameters
namethe name of the thread pool
sizethe size
idlenumber of idle threads
queuenumber of queued tasks
totalnumber of tasks executed during lifetime

Member Function Documentation

virtual int com::pcbsys::nirvana::nAdminAPI::nThreadPool::getIdle ( )
virtual

Get the number of idle threads within the thread pool.

Returns
the number of idle threads
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nThreadPool::getName ( )
virtual

Get the name of this thread pool.

Returns
the thread pool name
virtual int com::pcbsys::nirvana::nAdminAPI::nThreadPool::getQueue ( )
virtual

Get the number of current tasks queued within the thread pool.

Returns
the current number of queued tasks
virtual int com::pcbsys::nirvana::nAdminAPI::nThreadPool::getSize ( )
virtual

Get the size of the pool, i.e.

the number of threads allocated to the pool

Returns
the number of threads used within the pool
virtual longlong com::pcbsys::nirvana::nAdminAPI::nThreadPool::getTotal ( )
virtual

Get the total number of tasks executed by the thread pool during it's lifetime.

Returns
the total number of tasks executed