NCBI C++ ToolKit
|
Search Toolkit Book for CPSGAlerts
#include "alerts.hpp"
(Private to src/app/pubseq_gateway/server
.)
Public Member Functions | |
void | Register (EPSGS_AlertType alert_type, const string &message) |
EPSGS_AlertAckResult | Acknowledge (const string &alert_id, const string &user) |
EPSGS_AlertAckResult | Acknowledge (EPSGS_AlertType alert_type, const string &user) |
CJsonNode | Serialize (void) const |
CJsonNode | SerializeActive (void) const |
Private Member Functions | |
EPSGS_AlertType | x_IdToType (const string &alert_id) const |
string | x_TypeToId (EPSGS_AlertType type) const |
Private Attributes | |
mutex | m_Lock |
map< EPSGS_AlertType, SPSGAlertAttributes > | m_Alerts |
Definition at line 108 of file alerts.hpp.
EPSGS_AlertAckResult CPSGAlerts::Acknowledge | ( | const string & | alert_id, |
const string & | user | ||
) |
Definition at line 126 of file alerts.cpp.
References ePSGS_AlertNotFound, ePSGS_Unknown, and x_IdToType().
Referenced by CPubseqGatewayApp::OnAckAlert().
EPSGS_AlertAckResult CPSGAlerts::Acknowledge | ( | EPSGS_AlertType | alert_type, |
const string & | user | ||
) |
Definition at line 137 of file alerts.cpp.
References ePSGS_AlertAcknowledged, ePSGS_AlertAlreadyAcknowledged, ePSGS_AlertNotFound, m_Alerts, and m_Lock.
void CPSGAlerts::Register | ( | EPSGS_AlertType | alert_type, |
const string & | message | ||
) |
Definition at line 101 of file alerts.cpp.
References m_Alerts, m_Lock, and SPSGAlertAttributes::m_Message.
Referenced by CPubseqGatewayApp::CheckCassMapping(), CPubseqGatewayApp::OpenCache(), CPubseqGatewayApp::OpenCass(), CPubseqGatewayApp::PopulateCassandraMapping(), SPubseqGatewaySettings::Validate(), SPubseqGatewaySettings::x_ReadAdminSection(), SPubseqGatewaySettings::x_ReadCassandraProcessorSection(), SPubseqGatewaySettings::x_ReadCDDProcessorSection(), SPubseqGatewaySettings::x_ReadHealthSection(), SPubseqGatewaySettings::x_ReadLMDBProcessorSection(), SPubseqGatewaySettings::x_ReadServerSection(), SPubseqGatewaySettings::x_ReadSNPProcessorSection(), and SPubseqGatewaySettings::x_ReadWGSProcessorSection().
CJsonNode CPSGAlerts::Serialize | ( | void | ) | const |
Definition at line 180 of file alerts.cpp.
References m_Alerts, m_Lock, CJsonNode::NewObjectNode(), result, and x_TypeToId().
Referenced by CPubseqGatewayApp::OnGetAlerts().
CJsonNode CPSGAlerts::SerializeActive | ( | void | ) | const |
Definition at line 195 of file alerts.cpp.
References m_Alerts, m_Lock, CJsonNode::NewObjectNode(), result, and x_TypeToId().
|
private |
Definition at line 159 of file alerts.cpp.
References NStr::CompareNocase(), ePSGS_Unknown, kAlertToIdMap, kAlertToIdMapSize, and SAlertToId::type.
Referenced by Acknowledge().
|
private |
Definition at line 169 of file alerts.cpp.
References SAlertToId::id, kAlertToIdMap, and kAlertToIdMapSize.
Referenced by Serialize(), and SerializeActive().
|
private |
Definition at line 121 of file alerts.hpp.
Referenced by Acknowledge(), Register(), Serialize(), and SerializeActive().
|
mutableprivate |
Definition at line 120 of file alerts.hpp.
Referenced by Acknowledge(), Register(), Serialize(), and SerializeActive().