|
|
This class holds a list of stream sets. The purpose is to create a list of threads
| JBStreamSetList (JBEngine* engine, unsigned int max, unsigned int sleepMs,
const char* name)
| JBStreamSetList |
Constructor
Parameters:
| engine | Engine owning this list |
| max | Maximum streams per set (0 for maximum possible) |
| sleepMs | Time to sleep when idle |
| name | List name (for debugging purposes) |
| inline ObjList& sets ()
| sets |
Retrieve the stream set list. Make sure the list is locked before calling this method
Returns: The stream set list
| ~JBStreamSetList ()
| ~JBStreamSetList |
[virtual]
Destructor
| inline unsigned int maxStreams ()
| maxStreams |
[const]
Retrieve the maximum number of streams per set
Returns: The maximum number of streams per set
| inline unsigned int streamCount ()
| streamCount |
[const]
Retrieve the number of streams in all sets
Returns: The number of streams in all sets
| inline JBEngine* engine ()
| engine |
[const]
Retrieve the engine owning this list
Returns: The engine owning this list
| bool add (JBStream* client)
| add |
Add a stream to the list. Build a new set if there is no room in existing sets
Parameters:
| client | The stream to add |
Returns: True on success
| void remove (JBStream* client, bool delObj = true)
| remove |
Remove a stream from list
Parameters:
| client | The stream to remove |
| delObj | True to release the stream, false to remove it from list without releasing it |
| void stop (JBStreamSet* set = 0, bool waitTerminate = true)
| stop |
Stop one set or all sets
Parameters:
| set | The set to stop, 0 to stop all |
| waitTerminate | True to wait for all streams to terminate |
| const String& toString ()
| toString |
[const virtual]
Get the string representation of this list
Returns: The list name
Reimplemented from GenObject.
| void destroyed ()
| destroyed |
[protected virtual]
Stop all sets. Release memory
Reimplemented from RefObject.
| void remove (JBStreamSet* set)
| remove |
[protected]
Remove a set from list without deleting it
Parameters:
| set | The set to remove |
| JBStreamSet* build ()
| build |
[protected virtual]
Build a specialized stream set. Descendants must override this method
Returns: JBStreamSet pointer or 0
| JBEngine* m_engine | m_engine |
[protected]
| String m_name | m_name |
[protected]
| unsigned int m_max | m_max |
[protected]
| unsigned int m_sleepMs | m_sleepMs |
[protected]
| ObjList m_sets | m_sets |
[protected]
| Generated by: paulc on bussard on Sun Oct 20 21:06:06 2013, using kdoc 2.0a54. |