An interface for intranode process management classes.
More...
#include <be_process_manager.h>
Inherited by BiometricEvaluation::Process::ForkManager, and BiometricEvaluation::Process::POSIXThreadManager.
|
virtual void | _wait ()=0 |
| Do not return until all spawned processes exited. More...
|
|
An interface for intranode process management classes.
Definition at line 29 of file be_process_manager.h.
◆ Manager()
BiometricEvaluation::Process::Manager::Manager |
( |
| ) |
|
◆ ~Manager()
virtual BiometricEvaluation::Process::Manager::~Manager |
( |
| ) |
|
|
virtual |
◆ addWorker()
virtual std::shared_ptr< WorkerController > BiometricEvaluation::Process::Manager::addWorker |
( |
std::shared_ptr< Worker > |
worker | ) |
|
|
pure virtual |
◆ getNumCompletedWorkers()
virtual uint32_t BiometricEvaluation::Process::Manager::getNumCompletedWorkers |
( |
| ) |
const |
|
virtual |
Obtain the number of Workers that have exited.
- Returns
- The number of Workers that have exited.
- Exceptions
-
◆ getNumActiveWorkers()
virtual uint32_t BiometricEvaluation::Process::Manager::getNumActiveWorkers |
( |
| ) |
const |
|
virtual |
Obtain the number of Workers that are still working.
- Returns
- The number of Workers that are still working.
- Exceptions
-
◆ getTotalWorkers()
virtual uint32_t BiometricEvaluation::Process::Manager::getTotalWorkers |
( |
| ) |
const |
|
virtual |
Obtain the number of Workers this class is handling.
- Returns
- Number of Workers.
◆ startWorkers()
virtual void BiometricEvaluation::Process::Manager::startWorkers |
( |
bool |
wait = true , |
|
|
bool |
communicate = false |
|
) |
| |
|
pure virtual |
◆ startWorker()
virtual void BiometricEvaluation::Process::Manager::startWorker |
( |
std::shared_ptr< WorkerController > |
worker, |
|
|
bool |
wait = true , |
|
|
bool |
communicate = false |
|
) |
| |
|
pure virtual |
◆ waitForWorkerExit()
virtual void BiometricEvaluation::Process::Manager::waitForWorkerExit |
( |
| ) |
|
|
pure virtual |
◆ reset()
virtual void BiometricEvaluation::Process::Manager::reset |
( |
| ) |
|
|
virtual |
Reuse all Workers.
- Exceptions
-
◆ stopWorker()
virtual void BiometricEvaluation::Process::Manager::stopWorker |
( |
std::shared_ptr< WorkerController > |
worker | ) |
|
|
pure virtual |
◆ waitForMessage()
virtual bool BiometricEvaluation::Process::Manager::waitForMessage |
( |
std::shared_ptr< WorkerController > & |
sender, |
|
|
int * |
nextFD = nullptr , |
|
|
int |
numSeconds = -1 |
|
) |
| const |
|
virtual |
Wait for a message from a Worker.
- Parameters
-
[out] | sender | Reference to a shared pointer of the WorkerController that sent the message. |
[in,out] | nextFD | Location to store a pipe that has data to read. |
[in] | numSeconds | Number of seconds to wait for a message, or < 0 to block. |
- Returns
- true if there is a Worker sending a message false otherwise or if an error occurred.
◆ getNextMessage()
virtual bool BiometricEvaluation::Process::Manager::getNextMessage |
( |
std::shared_ptr< WorkerController > & |
sender, |
|
|
Memory::uint8Array & |
message, |
|
|
int |
numSeconds = -1 |
|
) |
| const |
|
virtual |
Obtain a message from a Worker.
- Parameters
-
[out] | sender | Reference to a shared pointer of the WorkerController that sent the message. |
[out] | message | Reference to a buffer to hold the message. |
[in] | numSeconds | Number of seconds to wait for a message, or < 0 to block. |
- Returns
- true if there is a message, false otherwise.
- Exceptions
-
◆ broadcastMessage()
virtual void BiometricEvaluation::Process::Manager::broadcastMessage |
( |
Memory::uint8Array & |
message | ) |
const |
|
virtual |
Send one message to all Workers.
- Parameters
-
message | The message to send to all Workers. |
- Exceptions
-
◆ _wait()
virtual void BiometricEvaluation::Process::Manager::_wait |
( |
| ) |
|
|
protectedpure virtual |
Do not return until all spawned processes exited.
◆ _workers
std::vector<std::shared_ptr<WorkerController> > BiometricEvaluation::Process::Manager::_workers |
|
protected |
◆ _pendingExit
std::vector<std::shared_ptr<WorkerController> > BiometricEvaluation::Process::Manager::_pendingExit |
|
protected |
The documentation for this class was generated from the following file: