25#ifndef MYSQL_HARNESS_PROCESS_STATE_COMPONENT_INCLUDED
26#define MYSQL_HARNESS_PROCESS_STATE_COMPONENT_INCLUDED
30#include "harness_export.h"
41 enum class Reason { NONE, REQUESTED, FATAL_ERROR };
43 [[nodiscard]] std::string
message()
const {
return message_; }
44 void message(
const std::string &msg) { message_ = msg; }
92 void request_application_shutdown(
94 const std::string &msg = {});
103 return shutdown_pending_;
Monitor can be waited for.
Definition: monitor.h:61
manages the state of the process.
Definition: process_state_component.h:69
void operator=(ProcessStateComponent &&)=delete
WaitableMonitor< ShutdownPending > & shutdown_pending()
pending shutdown state.
Definition: process_state_component.h:102
ProcessStateComponent(ProcessStateComponent const &)=delete
ProcessStateComponent()=default
ProcessStateComponent(ProcessStateComponent &&)=delete
void operator=(ProcessStateComponent const &)=delete
std::string key_type
Definition: process_state_component.h:73
Definition: process_state_component.h:36
void message(const std::string &msg)
Definition: process_state_component.h:44
Reason
Reason for shutdown.
Definition: process_state_component.h:41
std::string message_
Definition: process_state_component.h:51
std::string message() const
Definition: process_state_component.h:43
void reason(Reason r)
Definition: process_state_component.h:47
Reason reason() const
Definition: process_state_component.h:46
@ NONE
Definition: base.h:37
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:85