|
lintel 0.2.0
|
#include <ProcessService.h>
Additional Inherited Members | |
Protected Member Functions inherited from lintel::PropertyRegistration< ProcessService > | |
| std::shared_ptr< Property< type > > | registerProperty (std::string name, type defaultValue, std::string description, bool runtime, const std::string &fileName, int32_t position) |
Protected Attributes inherited from lintel::AbstractService< T > | |
| std::vector< std::shared_ptr< PropertyBase > > | m_properties |
Service for managing process execution, monitoring, and process groups.
| lintel::ProcessService::ProcessService | ( | std::shared_ptr< ProcessName > | processName, |
| std::shared_ptr< EnvironmentConfiguration > | environmentConfiguration, | ||
| std::shared_ptr< Configuration > | configuration, | ||
| std::shared_ptr< IHistoryService > | historyService | ||
| ) |
Construct a ProcessService.
| processName | the process name |
| environmentConfiguration | the environment configuration |
| configuration | the application configuration |
| historyService | the process history service |
|
override |
| std::vector< ProcessInfo > lintel::ProcessService::allActiveOf | ( | ) |
Returns information for all active processes.
| std::vector< ProcessGroupDto > lintel::ProcessService::allGroupsOf | ( | const std::string & | name | ) |
Returns all process groups matching the given name.
| name | the group name to search for |
| ProcessInfo lintel::ProcessService::currentOf | ( | ) |
Returns the current process information.
Detach from a running process without stopping it.
| process | the process to detach |
| void lintel::ProcessService::detachOf | ( | const ProcessGroup & | processGroup | ) |
Detach from all processes in the given group.
| processGroup | the group to detach |
| bool lintel::ProcessService::isLastProcess | ( | ) |
Check if this is the last running process in the application.
Returns the process with the given ID, if it exists.
| id | the process ID |
|
overridevirtual |
Default initialization does nothing; override in subclasses.
Reimplemented from lintel::AbstractService< T >.
Reset the restart counter and failure state of a process.
| process | the process to reset |
Restart a running process.
| process | the process to restart |
| void lintel::ProcessService::restartOf | ( | const ProcessGroup & | processGroup | ) |
Restart all processes in the given group.
| processGroup | the group to restart |
|
inlineoverridevirtual |
Returns the default shutdown priority.
Reimplemented from lintel::AbstractService< T >.
Start a process asynchronously.
| process | the process to start |
| void lintel::ProcessService::startOf | ( | const ProcessGroup & | processGroup | ) |
Start all processes in the given group.
| processGroup | the group to start |
Stop a running process gracefully.
| process | the process to stop |
| bool lintel::ProcessService::stopOf | ( | const ProcessGroup & | processGroup | ) |
Stop all processes in the given group gracefully.
| processGroup | the group to stop |
Terminate a running process forcefully.
| process | the process to terminate |
| void lintel::ProcessService::terminateOf | ( | const ProcessGroup & | processGroup | ) |
Terminate all processes in the given group forcefully.
| processGroup | the group to terminate |