| |
Public Types |
|
typedef spec::Handle | Handle |
| | ThreadGroup Handle definition. |
|
typedef spec::View | View |
| | ThreadGroup View definition. |
|
typedef spec::Holder | Holder |
| | ThreadGroup Holder definition. |
Public Member Functions |
| virtual String::View | getName () const |
| | Return the name of the group. |
| virtual ThreadGroup::View | getParent () const |
| | Return this groups parent group. |
| virtual void | destroy () |
| | Destroy this group and all of its subgroups. |
| virtual bool | isDestroyed () const |
| | Returns true if the group has been destroyed. |
| virtual size32_t | activeCount (bool fRecurse=true) const |
| | Return an estimate as to the number of threads in the group. |
| virtual size32_t | activeGroupCount (bool fRecurse=true) const |
| | Return an estimate as to the number of thread groups in the group. |
| virtual size32_t | enumerateThreads (ObjectArray::Handle hao, bool fRecurse=true) |
| | Copy into the specified array the active threads represented by this group. |
| virtual size32_t | enumerateThreads (ObjectArray::Handle hao, bool fRecurse=true) const |
| | Copy into the specified array the active threads represented by this group. |
| virtual size32_t | enumerateGroups (ObjectArray::Handle hao, bool fRecurse=true) |
| | Copy into the specified array the active thread groups represented by this group. |
| virtual size32_t | enumerateGroups (ObjectArray::Handle hao, bool fRecurse=true) const |
| | Copy into the specified array the active thread groups represented by this group. |
| virtual void | interrupt (bool fRecurse=true) |
| | Interrupt the threads represented by this group. |
| virtual size32_t | join (int64_t cMillis=0, bool fRecurse=true) const |
| | Join the threads represented by this group. |
virtual TypedHandle
< const String > | toString () const |
| | Output a human-readable description of this Object to the given stream. Note that when overriding this method the return type must be TypedHandle<const String> rather then String::View. These two types are assignment compatible but not equivalent and declaring the override with String::View will not be a compatible override. coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toString method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents and is generally how toString() will be implemented. The COH_TO_STRING macro is also the most common way to implement the toString method. For example: virtual TypedHandle<const String> Person::toString() const
{
return COH_TO_STRING("Name: " << f_sName << " SSN: " << f_nSSN);
}
- Returns:
- a string representation of this object
|
Protected Member Functions |
| | ThreadGroup (String::View vsName, ThreadGroup::Handle hParent=NULL) |
| | Create a new ThreadGroup. |
| virtual void | add (TypedHandle< Thread > hThread) |
| | Add a thread to this group. |
| virtual void | remove (TypedHandle< Thread > hThread) |
| | Remove a thread from this group. |
| virtual void | addGroup (ThreadGroup::Handle hGroup) |
| | Add a thread group to this group. |
| virtual void | removeGroup (ThreadGroup::Handle hGroup) |
| | Remove a thread group from this group. |
Protected Attributes |
|
FinalView< String > | f_vsName |
| | The group name. |
MemberHandle
< ThreadGroup > | m_hGroupParent |
| | The parent group. |
|
bool | m_fDestroyed |
| | True if the group has been destroyed. |
|
FinalHandle< Object > | f_hSetThreads |
| | The group's threads. |
|
FinalHandle< Object > | f_hSetGroups |
| | The group's child groups. |