MCPcopy Create free account
hub / github.com/Icinga/icinga2 / Pause

Method Pause

lib/perfdata/elasticsearchwriter.cpp:124–142  ·  view source on GitHub ↗

Pause is equivalent to Stop, but with HA capabilities to resume at runtime. */

Source from the content-addressed store, hash-verified

122
123/* Pause is equivalent to Stop, but with HA capabilities to resume at runtime. */
124void ElasticsearchWriter::Pause()
125{
126 m_HandleCheckResults.disconnect();
127 m_HandleStateChanges.disconnect();
128 m_HandleNotifications.disconnect();
129
130 m_FlushTimer->Stop(true);
131 m_WorkQueue.Join();
132
133 {
134 std::unique_lock<std::mutex> lock (m_DataBufferMutex);
135 Flush();
136 }
137
138 Log(LogInformation, "ElasticsearchWriter")
139 << "'" << GetName() << "' paused.";
140
141 ObjectImpl<ElasticsearchWriter>::Pause();
142}
143
144void ElasticsearchWriter::AddTemplateTags(const Dictionary::Ptr& fields, const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
145{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
StopMethod · 0.45
JoinMethod · 0.45

Tested by

no test coverage detected