Fawkes API  Fawkes Development Version
FawkesThreadManager::FawkesThreadManagerAspectCollector Class Reference
Inheritance diagram for FawkesThreadManager::FawkesThreadManagerAspectCollector:

List of all members.

Public Member Functions

 FawkesThreadManagerAspectCollector (FawkesThreadManager *parent_manager)
virtual void add (fawkes::ThreadList &tl)
 Add multiple threads.
virtual void add (fawkes::Thread *t)
 Add single thread.
virtual void remove (fawkes::ThreadList &tl)
 Remove multiple threads.
virtual void remove (fawkes::Thread *t)
 Remove single thread.
virtual void force_remove (fawkes::ThreadList &tl)
 Force removal of multiple threads.
virtual void force_remove (fawkes::Thread *t)
 Force removal of a single thread.

Member Function Documentation

void FawkesThreadManager::FawkesThreadManagerAspectCollector::add ( fawkes::ThreadList tl) [virtual]

Add multiple threads.

Adds all the threads in the list to the thread list. Implementations may throw an exception if this fails for whatever reason, read implementation documentation for details. The operation shall be atomic, either all threads are added successfully or none is added at all. If adding fails a CannotInitializeThreadException is thrown.

The thread is started if and only if initialization of all threads suceeds. A CannotInitializeThreadException is thrown if initialization failed for any thread.

Parameters:
tllist of threads to add

Implements fawkes::ThreadCollector.

Definition at line 61 of file thread_manager.cpp.

void FawkesThreadManager::FawkesThreadManagerAspectCollector::add ( fawkes::Thread t) [virtual]

Add single thread.

Adds the single thread to the internal (implementation specific) thread list. The thread is started if and only if initialization suceeds. A CannotInitializeThreadException is thrown if initialization failed.

Parameters:
tthread to add

Implements fawkes::ThreadCollector.

Definition at line 76 of file thread_manager.cpp.

void FawkesThreadManager::FawkesThreadManagerAspectCollector::force_remove ( fawkes::ThreadList tl) [virtual]

Force removal of multiple threads.

Remove all threads in the thread list from this collector. If there is a thread in the supplied thread list that has never been collected no error shall be thrown but this just be silently ignored.

The threads are finalized, cancelled and joined. The result of the finalization is ignored and the thread is cancelled and joined in any case.

Parameters:
tllist of threads to remove

Implements fawkes::ThreadCollector.

Definition at line 117 of file thread_manager.cpp.

void FawkesThreadManager::FawkesThreadManagerAspectCollector::force_remove ( fawkes::Thread t) [virtual]

Force removal of a single thread.

Remove the thread from the internal thread list. If the thread has never been collected no error shall be thrown but just be silently ignored. The threads are finalized, cancelled and joined. The result of the finalization is ignored and the thread is cancelled and joined in any case.

Parameters:
tThread to remove.

Implements fawkes::ThreadCollector.

Definition at line 123 of file thread_manager.cpp.

void FawkesThreadManager::FawkesThreadManagerAspectCollector::remove ( fawkes::ThreadList tl) [virtual]

Remove multiple threads.

Remove all threads in the thread list from this collector. If there is a thread in the supplied thread list that has never been collected no error shall be thrown but this just be silently ignored.

The threads are finalized, cancelled and joined. If the finalization fails for whatever reason the threads are NOT cancelled or stopped. In that case a CannotFinalizeThreadException is thrown.

Parameters:
tllist of threads to remove

Implements fawkes::ThreadCollector.

Definition at line 89 of file thread_manager.cpp.

void FawkesThreadManager::FawkesThreadManagerAspectCollector::remove ( fawkes::Thread t) [virtual]

Remove single thread.

Remove the thread from the internal thread list. If the thread has never been collected no error shall be thrown but just be silently ignored. The thread is finalized, cancelled and joined. If the finalization fails for whatever reason the thread is NOT cancelled or stopped. In that case a CannotFinalizeThreadException is thrown.

Parameters:
tThread to remove.

Implements fawkes::ThreadCollector.

Definition at line 104 of file thread_manager.cpp.


The documentation for this class was generated from the following files: