|
Yate
|
A list of stream sets. More...
#include <yatejabber.h>
Public Member Functions | |
| JBStreamSetList (JBEngine *engine, unsigned int max, unsigned int sleepMs, const char *name) | |
| ObjList & | sets () |
| virtual | ~JBStreamSetList () |
| unsigned int | maxStreams () const |
| unsigned int | streamCount () const |
| JBEngine * | engine () const |
| bool | add (JBStream *client) |
| void | remove (JBStream *client, bool delObj=true) |
| void | stop (JBStreamSet *set=0, bool waitTerminate=true) |
| virtual const String & | toString () const |
Public Member Functions inherited from RefObject | |
| RefObject () | |
| virtual | ~RefObject () |
| virtual void * | getObject (const String &name) const |
| virtual bool | alive () const |
| bool | ref () |
| bool | deref () |
| int | refcount () const |
| virtual void | destruct () |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Public Member Functions inherited from Mutex | |
| Mutex (bool recursive=false, const char *name=0) | |
| Mutex (const Mutex &original) | |
| ~Mutex () | |
| Mutex & | operator= (const Mutex &original) |
| virtual bool | lock (long maxwait=-1) |
| virtual bool | unlock () |
| virtual bool | locked () const |
| const char * | owner () const |
| bool | recursive () const |
Public Member Functions inherited from Lockable | |
| virtual | ~Lockable () |
| virtual bool | check (long maxwait=-1) |
| virtual bool | unlockAll () |
Protected Member Functions | |
| virtual void | destroyed () |
| void | remove (JBStreamSet *set) |
| virtual JBStreamSet * | build () |
Protected Member Functions inherited from RefObject | |
| virtual void | zeroRefs () |
| bool | resurrect () |
Protected Attributes | |
| JBEngine * | m_engine |
| String | m_name |
| unsigned int | m_max |
| unsigned int | m_sleepMs |
| ObjList | m_sets |
Friends | |
| class | JBStreamSet |
Additional Inherited Members | |
Static Public Member Functions inherited from RefObject | |
| static bool | alive (const RefObject *obj) |
| static bool | efficientIncDec () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
Static Public Member Functions inherited from Mutex | |
| static int | count () |
| static int | locks () |
| static bool | efficientTimedLock () |
Static Public Member Functions inherited from Lockable | |
| static void | wait (unsigned long maxwait) |
| static unsigned long | wait () |
| static void | startUsingNow () |
| static void | enableSafety (bool safe=true) |
| static bool | safety () |
A list of stream sets.
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 ) |
|
virtual |
Destructor
| bool add | ( | JBStream * | client | ) |
Add a stream to the list. Build a new set if there is no room in existing sets
| client | The stream to add |
|
protectedvirtual |
Build a specialized stream set. Descendants must override this method
References JBStreamSetList().
|
protectedvirtual |
Stop all sets. Release memory
Reimplemented from RefObject.
|
inline |
Retrieve the engine owning this list
Referenced by JBStreamSetList().
|
inline |
Retrieve the maximum number of streams per set
| void remove | ( | JBStream * | client, |
| bool | delObj = true ) |
Remove a stream from list
| client | The stream to remove |
| delObj | True to release the stream, false to remove it from list without releasing it |
|
protected |
Remove a set from list without deleting it
| set | The set to remove |
|
inline |
Retrieve the stream set list. Make sure the list is locked before calling this method
| void stop | ( | JBStreamSet * | set = 0, |
| bool | waitTerminate = true ) |
Stop one set or all sets
| set | The set to stop, 0 to stop all |
| waitTerminate | True to wait for all streams to terminate |
|
inline |
Retrieve the number of streams in all sets
|
virtual |