diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 6d57767d8..16b1adbd4 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -443,7 +443,6 @@ void Application::InstallExceptionHandlers(void) * Runs the application. * * @returns The application's exit code. - * @threadsafety Always. */ int Application::Run(void) { diff --git a/lib/base/array.cpp b/lib/base/array.cpp index db570f33a..fdb175698 100644 --- a/lib/base/array.cpp +++ b/lib/base/array.cpp @@ -38,7 +38,6 @@ Array::Array(void) * * @param index The index.. * @returns The value. - * @threadsafety Always. */ Value Array::Get(unsigned int index) const { @@ -53,7 +52,6 @@ Value Array::Get(unsigned int index) const * * @param index The index. * @param value The value. - * @threadsafety Always. */ void Array::Set(unsigned int index, const Value& value) { @@ -68,7 +66,6 @@ void Array::Set(unsigned int index, const Value& value) * Adds a value to the array. * * @param value The value. - * @threadsafety Always. */ void Array::Add(const Value& value) { @@ -82,6 +79,8 @@ void Array::Add(const Value& value) /** * Returns an iterator to the beginning of the array. * + * Note: Caller must hold the object lock while using the iterator. + * * @returns An iterator. */ Array::Iterator Array::Begin(void) @@ -94,6 +93,8 @@ Array::Iterator Array::Begin(void) /** * Returns an iterator to the end of the array. * + * Note: Caller must hold the object lock while using the iterator. + * * @returns An iterator. */ Array::Iterator Array::End(void) @@ -107,7 +108,6 @@ Array::Iterator Array::End(void) * Returns the number of elements in the array. * * @returns Number of elements. - * @threadsafety Always. */ size_t Array::GetLength(void) const { @@ -121,7 +121,6 @@ size_t Array::GetLength(void) const * Removes the specified index from the array. * * @param index The index. - * @threadsafety Always. */ void Array::Remove(unsigned int index) { @@ -175,7 +174,6 @@ bool Array::IsSealed(void) const * Makes a shallow copy of an array. * * @returns a copy of the array. - * @threadsafety Always. */ Array::Ptr Array::ShallowClone(void) const { @@ -194,7 +192,6 @@ Array::Ptr Array::ShallowClone(void) const * * @param json The JSON object. * @returns An array that is equivalent to the JSON object. - * @threadsafety Always. */ Array::Ptr Array::FromJson(cJSON *json) { @@ -217,7 +214,6 @@ Array::Ptr Array::FromJson(cJSON *json) * * @returns A JSON object that is equivalent to the array. Values that * cannot be represented in JSON are omitted. - * @threadsafety Always. */ cJSON *Array::ToJson(void) const { diff --git a/lib/base/asynctask.h b/lib/base/asynctask.h index 3dccdc445..d7b4a381e 100644 --- a/lib/base/asynctask.h +++ b/lib/base/asynctask.h @@ -68,8 +68,6 @@ public: /** * Starts the async task. The caller must hold a reference to the AsyncTask * object until the completion callback is invoked. - * - * @threadsafety Always. */ void Start(const CompletionCallback& completionCallback = CompletionCallback()) { @@ -82,8 +80,6 @@ public: /** * Checks whether the task is finished. - * - * @threadsafety Always. */ bool IsFinished(void) const { @@ -97,7 +93,6 @@ public: * the AsyncTask object. * * @returns The task's result. - * @threadsafety Always. */ TResult GetResult(void) { @@ -124,7 +119,6 @@ public: * Finishes the task using an exception. * * @param ex The exception. - * @threadsafety Always. */ void FinishException(const boost::exception_ptr& ex) { @@ -139,7 +133,6 @@ public: * Finishes the task using an ordinary result. * * @param result The result. - * @threadsafety Always. */ void FinishResult(const TResult& result) { @@ -162,8 +155,6 @@ private: /** * Finishes the task and causes the completion callback to be invoked. This * function must be called before the object is destroyed. - * - * @threadsafety Caller must hold m_Mutex. */ void FinishInternal(void) { diff --git a/lib/base/attribute.cpp b/lib/base/attribute.cpp index 1e71d4044..99cb68e8f 100644 --- a/lib/base/attribute.cpp +++ b/lib/base/attribute.cpp @@ -28,36 +28,24 @@ AttributeBase::AttributeBase(void) : m_Value() { } -/** - * @threadsafety Always. - */ void AttributeBase::Set(const Value& value) { boost::mutex::scoped_lock lock(l_Mutex); InternalSet(value); } -/** - * @threadsafety Always. - */ Value AttributeBase::Get(void) const { boost::mutex::scoped_lock lock(l_Mutex); return InternalGet(); } -/** - * @threadsafety Always. - */ AttributeBase::operator Value(void) const { boost::mutex::scoped_lock lock(l_Mutex); return InternalGet(); } -/** - * @threadsafety Always. - */ bool AttributeBase::IsEmpty(void) const { boost::mutex::scoped_lock lock(l_Mutex); @@ -65,7 +53,7 @@ bool AttributeBase::IsEmpty(void) const } /** - * @threadsafety Caller must hold l_Mutex; + * Note: Caller must hold l_Mutex; */ void AttributeBase::InternalSet(const Value& value) { @@ -73,7 +61,7 @@ void AttributeBase::InternalSet(const Value& value) } /** - * @threadsafety Caller must hold l_Mutex. + * Note: Caller must hold l_Mutex. */ const Value& AttributeBase::InternalGet(void) const { diff --git a/lib/base/attribute.h b/lib/base/attribute.h index 9475a0050..2dd27b151 100644 --- a/lib/base/attribute.h +++ b/lib/base/attribute.h @@ -75,17 +75,11 @@ template class Attribute : public AttributeBase { public: - /** - * @threadsafety Always. - */ void Set(const T& value) { AttributeBase::Set(value); } - /** - * @threadsafety Always. - */ Attribute& operator=(const T& rhs) { Set(rhs); @@ -102,9 +96,6 @@ public: return static_cast(value); } - /** - * @threadsafety Always. - */ operator T(void) const { return Get(); diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp index 7a529a606..c5cae0a5f 100644 --- a/lib/base/dictionary.cpp +++ b/lib/base/dictionary.cpp @@ -71,7 +71,6 @@ Dictionary::Dictionary(void) * * @param key The key whose value should be retrieved. * @returns The value of an empty value if the key was not found. - * @threadsafety Always. */ Value Dictionary::Get(const char *key) const { @@ -93,7 +92,6 @@ Value Dictionary::Get(const char *key) const * * @param key The key whose value should be retrieved. * @returns The value or an empty value if the key was not found. - * @threadsafety Always. */ Value Dictionary::Get(const String& key) const { @@ -105,7 +103,6 @@ Value Dictionary::Get(const String& key) const * * @param key The key. * @param value The value. - * @threadsafety Always. */ void Dictionary::Set(const String& key, const Value& value) { @@ -128,6 +125,8 @@ void Dictionary::Set(const String& key, const Value& value) /** * Returns an iterator to the beginning of the dictionary. * + * Note: Caller must hold the object lock while using the iterator. + * * @returns An iterator. */ Dictionary::Iterator Dictionary::Begin(void) @@ -140,6 +139,8 @@ Dictionary::Iterator Dictionary::Begin(void) /** * Returns an iterator to the end of the dictionary. * + * Note: Caller must hold the object lock while using the iterator. + * * @returns An iterator. */ Dictionary::Iterator Dictionary::End(void) @@ -153,7 +154,6 @@ Dictionary::Iterator Dictionary::End(void) * Returns the number of elements in the dictionary. * * @returns Number of elements. - * @threadsafety Always. */ size_t Dictionary::GetLength(void) const { @@ -168,7 +168,6 @@ size_t Dictionary::GetLength(void) const * * @param key The key. * @returns true if the dictionary contains the key, false otherwise. - * @threadsafety Always. */ bool Dictionary::Contains(const String& key) const { @@ -182,7 +181,6 @@ bool Dictionary::Contains(const String& key) const * Removes the specified key from the dictionary. * * @param key The key. - * @threadsafety Always. */ void Dictionary::Remove(const String& key) { @@ -242,7 +240,6 @@ bool Dictionary::IsSealed(void) const * Makes a shallow copy of a dictionary. * * @returns a copy of the dictionary. - * @threadsafety Always. */ Dictionary::Ptr Dictionary::ShallowClone(void) const { @@ -265,7 +262,6 @@ Dictionary::Ptr Dictionary::ShallowClone(void) const * * @param json The JSON object. * @returns A dictionary that is equivalent to the JSON object. - * @threadsafety Always. */ Dictionary::Ptr Dictionary::FromJson(cJSON *json) { @@ -288,7 +284,6 @@ Dictionary::Ptr Dictionary::FromJson(cJSON *json) * * @returns A JSON object that is equivalent to the dictionary. Values that * cannot be represented in JSON are omitted. - * @threadsafety Always. */ cJSON *Dictionary::ToJson(void) const { diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 22bd59d3d..72f505931 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -68,9 +68,6 @@ DynamicObject::DynamicObject(const Dictionary::Ptr& serializedObject) boost::call_once(l_TransactionOnce, &DynamicObject::Initialize); } -/* - * @threadsafety Always. - */ DynamicObject::~DynamicObject(void) { } @@ -203,7 +200,7 @@ void DynamicObject::RegisterAttribute(const String& name, } /** - * @threadsafety Caller must hold m_AttributeMutex. + * Note: Caller must hold m_AttributeMutex. */ void DynamicObject::InternalRegisterAttribute(const String& name, AttributeType type, AttributeBase *boundAttribute) @@ -223,9 +220,6 @@ void DynamicObject::InternalRegisterAttribute(const String& name, } } -/** - * @threadsafety Always. - */ void DynamicObject::Set(const String& name, const Value& data) { ASSERT(!OwnsLock()); @@ -236,9 +230,6 @@ void DynamicObject::Set(const String& name, const Value& data) InternalSetAttribute(name, data, GetCurrentTx()); } -/** - * @threadsafety Always. - */ void DynamicObject::Touch(const String& name) { ASSERT(OwnsLock()); @@ -260,9 +251,6 @@ void DynamicObject::Touch(const String& name) } } -/** - * @threadsafety Always. - */ Value DynamicObject::Get(const String& name) const { ASSERT(!OwnsLock()); @@ -274,7 +262,7 @@ Value DynamicObject::Get(const String& name) const } /** - * @threadsafety Caller must hold m_AttributeMutex. + * Note: Caller must hold m_AttributeMutex. */ void DynamicObject::InternalSetAttribute(const String& name, const Value& data, double tx, bool allowEditConfig) @@ -315,7 +303,7 @@ void DynamicObject::InternalSetAttribute(const String& name, const Value& data, } /** - * @threadsafety Caller must hold m_AttributeMutex. + * Note: Caller must hold m_AttributeMutex. */ Value DynamicObject::InternalGetAttribute(const String& name) const { @@ -330,51 +318,33 @@ Value DynamicObject::InternalGetAttribute(const String& name) const return it->second.GetValue(); } -/** - * @threadsafety Always. - */ DynamicType::Ptr DynamicObject::GetType(void) const { return DynamicType::GetByName(m_Type); } -/** - * @threadsafety Always. - */ String DynamicObject::GetName(void) const { return m_Name; } -/** - * @threadsafety Always. - */ bool DynamicObject::IsLocal(void) const { return m_Local; } -/** - * @threadsafety Always. - */ bool DynamicObject::IsRegistered(void) const { ObjectLock olock(GetType()); return m_Registered; } -/** - * @threadsafety Always. - */ void DynamicObject::SetSource(const String& value) { m_Source = value; Touch("__source"); } -/** - * @threadsafety Always. - */ String DynamicObject::GetSource(void) const { return m_Source; @@ -463,9 +433,6 @@ ScriptTask::Ptr DynamicObject::MakeMethodTask(const String& method, return boost::make_shared(func, arguments); } -/* - * @threadsafety Always. - */ void DynamicObject::DumpObjects(const String& filename) { Log(LogInformation, "base", "Dumping program state to file '" + filename + "'"); @@ -528,9 +495,6 @@ void DynamicObject::DumpObjects(const String& filename) } } -/* - * @threadsafety Always. - */ void DynamicObject::RestoreObjects(const String& filename) { Log(LogInformation, "base", "Restoring program state from file '" + filename + "'"); @@ -588,9 +552,6 @@ void DynamicObject::DeactivateObjects(void) } } -/* - * @threadsafety Always. - */ double DynamicObject::GetCurrentTx(void) { boost::mutex::scoped_lock lock(l_TransactionMutex); @@ -608,9 +569,6 @@ void DynamicObject::Flush(void) OnFlushObject(GetCurrentTx(), GetSelf()); } -/* - * @threadsafety Always. Caller must not hold any Object locks. - */ void DynamicObject::NewTx(void) { double tx; @@ -650,9 +608,6 @@ void DynamicObject::OnAttributeChanged(const String&) ASSERT(!OwnsLock()); } -/* - * @threadsafety Always. - */ DynamicObject::Ptr DynamicObject::GetObject(const String& type, const String& name) { DynamicType::Ptr dtype = DynamicType::GetByName(type); diff --git a/lib/base/dynamictype.cpp b/lib/base/dynamictype.cpp index aaf1a645d..492d12ab7 100644 --- a/lib/base/dynamictype.cpp +++ b/lib/base/dynamictype.cpp @@ -27,9 +27,6 @@ DynamicType::DynamicType(const String& name, const DynamicType::ObjectFactory& f : m_Name(name), m_ObjectFactory(factory) { } -/** - * @threadsafety Always. - */ DynamicType::Ptr DynamicType::GetByName(const String& name) { boost::mutex::scoped_lock lock(GetStaticMutex()); @@ -43,7 +40,7 @@ DynamicType::Ptr DynamicType::GetByName(const String& name) } /** - * @threadsafety Caller must hold DynamicType::GetStaticMutex() while using the map. + * Note: Caller must hold DynamicType::GetStaticMutex() while using the map. */ DynamicType::TypeMap& DynamicType::InternalGetTypeMap(void) { @@ -120,9 +117,6 @@ void DynamicType::UnregisterObject(const DynamicObject::Ptr& object) object->OnUnregistrationCompleted(); } -/** - * @threadsafety Always. - */ DynamicObject::Ptr DynamicType::GetObject(const String& name) const { ObjectLock olock(this); @@ -135,9 +129,6 @@ DynamicObject::Ptr DynamicType::GetObject(const String& name) const return nt->second; } -/** - * @threadsafety Always. - */ void DynamicType::RegisterType(const DynamicType::Ptr& type) { boost::mutex::scoped_lock lock(GetStaticMutex()); diff --git a/lib/base/eventqueue.cpp b/lib/base/eventqueue.cpp index 6bac6a940..3c6a065c7 100644 --- a/lib/base/eventqueue.cpp +++ b/lib/base/eventqueue.cpp @@ -27,9 +27,6 @@ using namespace icinga; -/** - * @threadsafety Always. - */ EventQueue::EventQueue(void) : m_Stopped(false) { @@ -47,18 +44,12 @@ EventQueue::EventQueue(void) reportThread.detach(); } -/** - * @threadsafety Always. - */ EventQueue::~EventQueue(void) { Stop(); Join(); } -/** - * @threadsafety Always. - */ void EventQueue::Stop(void) { boost::mutex::scoped_lock lock(m_Mutex); @@ -68,8 +59,6 @@ void EventQueue::Stop(void) /** * Waits for all worker threads to finish. - * - * @threadsafety Always. */ void EventQueue::Join(void) { @@ -78,8 +67,6 @@ void EventQueue::Join(void) /** * Waits for events and processes them. - * - * @threadsafety Always. */ void EventQueue::QueueThreadProc(void) { @@ -158,7 +145,6 @@ void EventQueue::QueueThreadProc(void) * Appends an event to the event queue. Events will be processed in FIFO order. * * @param callback The callback function for the event. - * @threadsafety Always. */ void EventQueue::Post(const EventQueue::Callback& callback) { diff --git a/lib/base/netstring.cpp b/lib/base/netstring.cpp index 6da9b07ca..f1332cf2f 100644 --- a/lib/base/netstring.cpp +++ b/lib/base/netstring.cpp @@ -30,7 +30,6 @@ using namespace icinga; * @returns true if a complete String was read from the IOQueue, false otherwise. * @exception invalid_argument The input stream is invalid. * @see https://github.com/PeterScott/netString-c/blob/master/netString.c - * @threadsafety Always. */ bool NetString::ReadStringFromStream(const Stream::Ptr& stream, String *str) { @@ -112,7 +111,6 @@ bool NetString::ReadStringFromStream(const Stream::Ptr& stream, String *str) * * @param stream The stream. * @param str The String that is to be written. - * @threadsafety Always. */ void NetString::WriteStringToStream(const Stream::Ptr& stream, const String& str) { diff --git a/lib/base/object.cpp b/lib/base/object.cpp index 39d783348..9ef756944 100644 --- a/lib/base/object.cpp +++ b/lib/base/object.cpp @@ -44,7 +44,6 @@ Object::~Object(void) * Returns a reference-counted pointer to this object. * * @returns A shared_ptr object that points to this object - * @threadsafety Always. */ Object::SharedPtrHolder Object::GetSelf(void) { diff --git a/lib/base/ringbuffer.cpp b/lib/base/ringbuffer.cpp index 11bf5cd9f..13c18f8a7 100644 --- a/lib/base/ringbuffer.cpp +++ b/lib/base/ringbuffer.cpp @@ -26,9 +26,6 @@ RingBuffer::RingBuffer(RingBuffer::SizeType slots) : Object(), m_Slots(slots, 0), m_TimeValue(0) { } -/** - * @threadsafety Always. - */ RingBuffer::SizeType RingBuffer::GetLength(void) const { ObjectLock olock(this); @@ -36,9 +33,6 @@ RingBuffer::SizeType RingBuffer::GetLength(void) const return m_Slots.size(); } -/** - * @threadsafety Always. - */ void RingBuffer::InsertValue(RingBuffer::SizeType tv, int num) { ObjectLock olock(this); @@ -64,9 +58,6 @@ void RingBuffer::InsertValue(RingBuffer::SizeType tv, int num) m_Slots[offsetTarget] += num; } -/** - * @threadsafety Always. - */ int RingBuffer::GetValues(RingBuffer::SizeType span) const { ObjectLock olock(this); diff --git a/lib/base/script.cpp b/lib/base/script.cpp index 17fdffe92..bde14a393 100644 --- a/lib/base/script.cpp +++ b/lib/base/script.cpp @@ -40,9 +40,6 @@ Script::Script(const Dictionary::Ptr& serializedUpdate) RegisterAttribute("code", Attribute_Config, &m_Code); } -/** - * @threadsafety Always. - */ void Script::Start(void) { ASSERT(OwnsLock()); @@ -50,9 +47,6 @@ void Script::Start(void) SpawnInterpreter(); } -/** - * @threadsafety Always. - */ String Script::GetLanguage(void) const { ObjectLock olock(this); @@ -60,9 +54,6 @@ String Script::GetLanguage(void) const return m_Language; } -/** - * @threadsafety Always. - */ String Script::GetCode(void) const { ObjectLock olock(this); @@ -70,9 +61,6 @@ String Script::GetCode(void) const return m_Code; } -/** - * @threadsafety Always. - */ void Script::OnAttributeUpdate(const String& name) { ASSERT(!OwnsLock()); @@ -81,9 +69,6 @@ void Script::OnAttributeUpdate(const String& name) SpawnInterpreter(); } -/** - * @threadsafety Always. - */ void Script::SpawnInterpreter(void) { Log(LogInformation, "base", "Reloading script '" + GetName() + "'"); diff --git a/lib/base/scriptfunction.cpp b/lib/base/scriptfunction.cpp index f82bbe083..fb352be9f 100644 --- a/lib/base/scriptfunction.cpp +++ b/lib/base/scriptfunction.cpp @@ -28,9 +28,6 @@ ScriptFunction::ScriptFunction(const Callback& function) : m_Callback(function) { } -/** - * @threadsafety Always. - */ void ScriptFunction::Invoke(const ScriptTask::Ptr& task, const std::vector& arguments) { m_Callback(task, arguments); diff --git a/lib/base/scriptlanguage.cpp b/lib/base/scriptlanguage.cpp index 6f7a82ac9..c2dc352ee 100644 --- a/lib/base/scriptlanguage.cpp +++ b/lib/base/scriptlanguage.cpp @@ -24,9 +24,6 @@ using namespace icinga; ScriptLanguage::ScriptLanguage(void) { } -/** - * @threadsafety Always. - */ void ScriptLanguage::Register(const String& name, const ScriptLanguage::Ptr& language) { boost::mutex::scoped_lock lock(GetMutex()); @@ -34,9 +31,6 @@ void ScriptLanguage::Register(const String& name, const ScriptLanguage::Ptr& lan GetLanguages()[name] = language; } -/** - * @threadsafety Always. - */ void ScriptLanguage::Unregister(const String& name) { boost::mutex::scoped_lock lock(GetMutex()); @@ -44,9 +38,6 @@ void ScriptLanguage::Unregister(const String& name) GetLanguages().erase(name); } -/** - * @threadsafety Always. - */ ScriptLanguage::Ptr ScriptLanguage::GetByName(const String& name) { boost::mutex::scoped_lock lock(GetMutex()); diff --git a/lib/base/stdiostream.cpp b/lib/base/stdiostream.cpp index 8266614c6..477208a65 100644 --- a/lib/base/stdiostream.cpp +++ b/lib/base/stdiostream.cpp @@ -45,9 +45,6 @@ StdioStream::~StdioStream(void) m_ReadAheadBuffer->Close(); } -/** - * @threadsafety Always. - */ void StdioStream::Start(void) { SetConnected(true); @@ -55,9 +52,6 @@ void StdioStream::Start(void) Stream::Start(); } -/** - * @threadsafety Always. - */ size_t StdioStream::GetAvailableBytes(void) const { ObjectLock olock(this); @@ -68,9 +62,6 @@ size_t StdioStream::GetAvailableBytes(void) const return 1024; /* doesn't have to be accurate */ } -/** - * @threadsafety Always. - */ size_t StdioStream::Read(void *buffer, size_t size) { ObjectLock olock(this); @@ -86,9 +77,6 @@ size_t StdioStream::Read(void *buffer, size_t size) return peek_len + read_len; } -/** - * @threadsafety Always. - */ size_t StdioStream::Peek(void *buffer, size_t size) { ObjectLock olock(this); @@ -105,9 +93,6 @@ size_t StdioStream::Peek(void *buffer, size_t size) return peek_len + read_len; } -/** - * @threadsafety Always. - */ void StdioStream::Write(const void *buffer, size_t size) { ObjectLock olock(this); @@ -115,9 +100,6 @@ void StdioStream::Write(const void *buffer, size_t size) m_InnerStream->write(static_cast(buffer), size); } -/** - * @threadsafety Always. - */ void StdioStream::Close(void) { if (m_OwnsStream) diff --git a/lib/base/stream.cpp b/lib/base/stream.cpp index d8040e0d2..c086fcef8 100644 --- a/lib/base/stream.cpp +++ b/lib/base/stream.cpp @@ -33,9 +33,6 @@ Stream::~Stream(void) ASSERT(!m_Running); } -/** - * @threadsafety Always. - */ bool Stream::IsConnected(void) const { ObjectLock olock(this); @@ -43,9 +40,6 @@ bool Stream::IsConnected(void) const return m_Connected; } -/** - * @threadsafety Always. - */ bool Stream::IsReadEOF(void) const { ObjectLock olock(this); @@ -53,9 +47,6 @@ bool Stream::IsReadEOF(void) const return m_ReadEOF; } -/** - * @threadsafety Always. - */ bool Stream::IsWriteEOF(void) const { ObjectLock olock(this); @@ -63,9 +54,6 @@ bool Stream::IsWriteEOF(void) const return m_WriteEOF; } -/** - * @threadsafety Always. - */ void Stream::SetConnected(bool connected) { bool changed; @@ -84,9 +72,6 @@ void Stream::SetConnected(bool connected) } } -/** - * @threadsafety Always. - */ void Stream::SetReadEOF(bool eof) { ObjectLock olock(this); @@ -94,9 +79,6 @@ void Stream::SetReadEOF(bool eof) m_ReadEOF = eof; } -/** - * @threadsafety Always. - */ void Stream::SetWriteEOF(bool eof) { ObjectLock olock(this); @@ -107,8 +89,6 @@ void Stream::SetWriteEOF(bool eof) /** * Checks whether an exception is available for this stream and re-throws * the exception if there is one. - * - * @threadsafety Always. */ void Stream::CheckException(void) { @@ -118,9 +98,6 @@ void Stream::CheckException(void) rethrow_exception(m_Exception); } -/** - * @threadsafety Always. - */ void Stream::SetException(boost::exception_ptr exception) { ObjectLock olock(this); @@ -128,17 +105,11 @@ void Stream::SetException(boost::exception_ptr exception) m_Exception = exception; } -/** - * @threadsafety Always. - */ boost::exception_ptr Stream::GetException(void) { return m_Exception; } -/** - * @threadsafety Always. - */ void Stream::Start(void) { ObjectLock olock(this); @@ -146,9 +117,6 @@ void Stream::Start(void) m_Running = true; } -/** - * @threadsafety Always. - */ void Stream::Close(void) { { diff --git a/lib/base/stream_bio.cpp b/lib/base/stream_bio.cpp index 9640003a4..814838b24 100644 --- a/lib/base/stream_bio.cpp +++ b/lib/base/stream_bio.cpp @@ -49,17 +49,11 @@ typedef struct I2Stream_bio_s boost::exception_ptr Exception; } I2Stream_bio_t; -/** - * @threadsafety Always. - */ BIO_METHOD *BIO_s_I2Stream(void) { return &I2Stream_method; } -/** - * @threadsafety Always. - */ BIO *icinga::BIO_new_I2Stream(const Stream::Ptr& stream) { BIO *bi = BIO_new(BIO_s_I2Stream()); @@ -74,9 +68,6 @@ BIO *icinga::BIO_new_I2Stream(const Stream::Ptr& stream) return bi; } -/** - * @threadsafety Always. - */ void icinga::I2Stream_check_exception(BIO *bi) { I2Stream_bio_t *bp = (I2Stream_bio_t *)bi->ptr; @@ -87,9 +78,6 @@ void icinga::I2Stream_check_exception(BIO *bi) { } } -/** - * @threadsafety Always. - */ static int I2Stream_new(BIO *bi) { bi->shutdown = 0; @@ -100,9 +88,6 @@ static int I2Stream_new(BIO *bi) return 1; } -/** - * @threadsafety Always. - */ static int I2Stream_free(BIO *bi) { I2Stream_bio_t *bp = (I2Stream_bio_t *)bi->ptr; @@ -111,9 +96,6 @@ static int I2Stream_free(BIO *bi) return 1; } -/** - * @threadsafety Always. - */ static int I2Stream_read(BIO *bi, char *out, int outl) { I2Stream_bio_t *bp = (I2Stream_bio_t *)bi->ptr; @@ -137,9 +119,6 @@ static int I2Stream_read(BIO *bi, char *out, int outl) return data_read; } -/** - * @threadsafety Always. - */ static int I2Stream_write(BIO *bi, const char *in, int inl) { I2Stream_bio_t *bp = (I2Stream_bio_t *)bi->ptr; @@ -148,9 +127,6 @@ static int I2Stream_write(BIO *bi, const char *in, int inl) return inl; } -/** - * @threadsafety Always. - */ static long I2Stream_ctrl(BIO *, int cmd, long, void *) { switch (cmd) { diff --git a/lib/base/streamlogger.cpp b/lib/base/streamlogger.cpp index 1abaea479..41e300686 100644 --- a/lib/base/streamlogger.cpp +++ b/lib/base/streamlogger.cpp @@ -53,9 +53,6 @@ StreamLogger::~StreamLogger(void) delete m_Stream; } -/** - * @threadsafety Always. - */ void StreamLogger::OpenFile(const String& filename) { std::ofstream *stream = new std::ofstream(); @@ -83,7 +80,6 @@ void StreamLogger::OpenFile(const String& filename) * @param stream The output stream. * @param tty Whether the output stream is a TTY. * @param entry The log entry. - * @threadsafety Always. */ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntry& entry) { @@ -118,7 +114,6 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, bool tty, const LogEntr * Processes a log entry and outputs it to a stream. * * @param entry The log entry. - * @threadsafety Always. */ void StreamLogger::ProcessLogEntry(const LogEntry& entry) { @@ -128,7 +123,10 @@ void StreamLogger::ProcessLogEntry(const LogEntry& entry) } /** - * @threadsafety Always. + * Checks whether the specified stream is a terminal. + * + * @param stream The stream. + * @returns true if the stream is a terminal, false otherwise. */ bool StreamLogger::IsTty(std::ostream& stream) { diff --git a/lib/base/sysloglogger.cpp b/lib/base/sysloglogger.cpp index f05079089..aa96a48de 100644 --- a/lib/base/sysloglogger.cpp +++ b/lib/base/sysloglogger.cpp @@ -26,7 +26,6 @@ using namespace icinga; * Processes a log entry and outputs it to syslog. * * @param entry The log entry. - * @threadsafety Always. */ void SyslogLogger::ProcessLogEntry(const LogEntry& entry) { diff --git a/lib/base/tcpsocket.cpp b/lib/base/tcpsocket.cpp index 78cb47ceb..b656d268f 100644 --- a/lib/base/tcpsocket.cpp +++ b/lib/base/tcpsocket.cpp @@ -42,7 +42,6 @@ void TcpSocket::Bind(String service, int family) * @param node The node. * @param service The service. * @param family The address family for the socket. - * @threadsafety Always. */ void TcpSocket::Bind(String node, String service, int family) { @@ -113,7 +112,6 @@ void TcpSocket::Bind(String node, String service, int family) * * @param node The node. * @param service The service. - * @threadsafety Always. */ void TcpSocket::Connect(const String& node, const String& service) { diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp index 750722935..feef9c613 100644 --- a/lib/base/timer.cpp +++ b/lib/base/timer.cpp @@ -40,9 +40,10 @@ struct icinga::TimerNextExtractor /** * Extracts the next timestamp from a Timer. * + * Note: Caller must hold l_Mutex. + * * @param wtimer Weak pointer to the timer. * @returns The next timestamp - * @threadsafety Caller must hold l_Mutex. */ double operator()(const weak_ptr& wtimer) { @@ -71,8 +72,6 @@ static TimerSet l_Timers; /** * Constructor for the Timer class. - * - * @threadsafety Always. */ Timer::Timer(void) : m_Interval(0), m_Next(0) @@ -80,8 +79,6 @@ Timer::Timer(void) /** * Initializes the timer sub-system. - * - * @threadsafety Always. */ void Timer::Initialize(void) { @@ -92,8 +89,6 @@ void Timer::Initialize(void) /** * Disables the timer sub-system. - * - * @threadsafety Always. */ void Timer::Uninitialize(void) { @@ -108,8 +103,6 @@ void Timer::Uninitialize(void) /** * Calls this timer. - * - * @threadsafety Always. */ void Timer::Call(void) { @@ -132,7 +125,6 @@ void Timer::Call(void) * Sets the interval for this timer. * * @param interval The new interval. - * @threadsafety Always. */ void Timer::SetInterval(double interval) { @@ -146,7 +138,6 @@ void Timer::SetInterval(double interval) * Retrieves the interval for this timer. * * @returns The interval. - * @threadsafety Always. */ double Timer::GetInterval(void) const { @@ -158,8 +149,6 @@ double Timer::GetInterval(void) const /** * Registers the timer and starts processing events for it. - * - * @threadsafety Always. */ void Timer::Start(void) { @@ -175,8 +164,6 @@ void Timer::Start(void) /** * Unregisters the timer and stops processing events for it. - * - * @threadsafety Always. */ void Timer::Stop(void) { @@ -196,7 +183,6 @@ void Timer::Stop(void) * * @param next The time when this timer should be called again. Use -1 to let * the timer figure out a suitable time based on the interval. - * @threadsafety Always. */ void Timer::Reschedule(double next) { @@ -228,7 +214,6 @@ void Timer::Reschedule(double next) * Retrieves when the timer is next due. * * @returns The timestamp. - * @threadsafety Always. */ double Timer::GetNext(void) const { @@ -243,7 +228,6 @@ double Timer::GetNext(void) const * next scheduled timestamp. * * @param adjustment The adjustment. - * @threadsafety Always. */ void Timer::AdjustTimers(double adjustment) { @@ -272,8 +256,6 @@ void Timer::AdjustTimers(double adjustment) /** * Worker thread proc for Timer objects. - * - * @threadsafety Always. */ void Timer::TimerThreadProc(void) { diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index a1ae17d5e..ed8564cd6 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -397,7 +397,6 @@ DynamicObject::Ptr ConfigItem::GetDynamicObject(void) const * @param type The type of the ConfigItem that is to be looked up. * @param name The name of the ConfigItem that is to be looked up. * @returns The configuration item. - * @threadsafety Always. */ ConfigItem::Ptr ConfigItem::GetObject(const String& type, const String& name) { @@ -444,9 +443,6 @@ void ConfigItem::Dump(std::ostream& fp) const fp << "}" << "\n"; } -/** - * @threadsafety Always. - */ void ConfigItem::UnloadUnit(const String& unit) { std::vector obsoleteItems; diff --git a/lib/config/configtype.cpp b/lib/config/configtype.cpp index bc23aba07..ce3b6c8c8 100644 --- a/lib/config/configtype.cpp +++ b/lib/config/configtype.cpp @@ -88,9 +88,6 @@ void ConfigType::ValidateItem(const ConfigItem::Ptr& item) const ValidateDictionary(attrs, ruleLists, locations); } -/** - * @threadsafety Always. - */ String ConfigType::LocationToString(const std::vector& locations) { bool first = true; @@ -107,9 +104,6 @@ String ConfigType::LocationToString(const std::vector& locations) return stack; } -/** - * @threadsafety Always. - */ void ConfigType::ValidateDictionary(const Dictionary::Ptr& dictionary, const std::vector& ruleLists, std::vector& locations) { @@ -188,9 +182,6 @@ void ConfigType::ValidateDictionary(const Dictionary::Ptr& dictionary, } } -/** - * @threadsafety Always. - */ void ConfigType::ValidateArray(const Array::Ptr& array, const std::vector& ruleLists, std::vector& locations) { diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index d5145ee9d..bb884fd69 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -182,9 +182,6 @@ void Expression::DumpValue(std::ostream& fp, int indent, const Value& value, boo BOOST_THROW_EXCEPTION(std::runtime_error("Encountered unknown type while dumping value.")); } -/** - * @threadsafety Always. - */ void Expression::Dump(std::ostream& fp, int indent) const { if (m_Operator == OperatorExecute) { diff --git a/lib/icinga/api.cpp b/lib/icinga/api.cpp index 7a51e7b8e..10aaf772b 100644 --- a/lib/icinga/api.cpp +++ b/lib/icinga/api.cpp @@ -25,9 +25,6 @@ using namespace icinga; REGISTER_SCRIPTFUNCTION(GetAnswerToEverything, &API::GetAnswerToEverything); -/** - * @threadsafety Always. - */ void API::GetAnswerToEverything(const ScriptTask::Ptr& task, const std::vector& arguments) { if (arguments.size() < 1) diff --git a/lib/icinga/cib.cpp b/lib/icinga/cib.cpp index a12666045..aa9448c38 100644 --- a/lib/icinga/cib.cpp +++ b/lib/icinga/cib.cpp @@ -24,33 +24,21 @@ using namespace icinga; RingBuffer CIB::m_ActiveChecksStatistics(15 * 60); RingBuffer CIB::m_PassiveChecksStatistics(15 * 60); -/** - * @threadsafety Always. - */ void CIB::UpdateActiveChecksStatistics(long tv, int num) { m_ActiveChecksStatistics.InsertValue(tv, num); } -/** - * @threadsafety Always. - */ int CIB::GetActiveChecksStatistics(long timespan) { return m_ActiveChecksStatistics.GetValues(timespan); } -/** - * @threadsafety Always. - */ void CIB::UpdatePassiveChecksStatistics(long tv, int num) { m_PassiveChecksStatistics.InsertValue(tv, num); } -/** - * @threadsafety Always. - */ int CIB::GetPassiveChecksStatistics(long timespan) { return m_PassiveChecksStatistics.GetValues(timespan); diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index 41532ac83..09abce922 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -40,9 +40,6 @@ boost::once_flag ExternalCommandProcessor::m_InitializeOnce = BOOST_ONCE_INIT; boost::mutex ExternalCommandProcessor::m_Mutex; std::map ExternalCommandProcessor::m_Commands; -/** - * @threadsafety Always. - */ void ExternalCommandProcessor::Execute(const String& line) { if (line.IsEmpty()) @@ -74,9 +71,6 @@ void ExternalCommandProcessor::Execute(const String& line) Execute(ts, argv[0], argvExtra); } -/** - * @threadsafety Always. - */ void ExternalCommandProcessor::Execute(double time, const String& command, const std::vector& arguments) { boost::call_once(m_InitializeOnce, &ExternalCommandProcessor::Initialize); @@ -98,9 +92,6 @@ void ExternalCommandProcessor::Execute(double time, const String& command, const callback(time, arguments); } -/** - * @threadsafety Always. - */ void ExternalCommandProcessor::Initialize(void) { RegisterCommand("PROCESS_HOST_CHECK_RESULT", &ExternalCommandProcessor::ProcessHostCheckResult); @@ -162,9 +153,6 @@ void ExternalCommandProcessor::Initialize(void) RegisterCommand("DISABLE_SVC_NOTIFICATIONS", &ExternalCommandProcessor::DisableSvcNotifications); } -/** - * @threadsafety Always. - */ void ExternalCommandProcessor::RegisterCommand(const String& command, const ExternalCommandProcessor::Callback& callback) { boost::mutex::scoped_lock lock(m_Mutex); diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 75551caa9..408ba4721 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -83,9 +83,6 @@ String Host::GetDisplayName(void) const return GetName(); } -/** - * @threadsafety Always. - */ Host::Ptr Host::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("Host", name); diff --git a/lib/icinga/hostgroup.cpp b/lib/icinga/hostgroup.cpp index 258f715b4..cc0666ea9 100644 --- a/lib/icinga/hostgroup.cpp +++ b/lib/icinga/hostgroup.cpp @@ -47,9 +47,6 @@ HostGroup::~HostGroup(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ void HostGroup::OnRegistrationCompleted(void) { ASSERT(!OwnsLock()); @@ -57,9 +54,6 @@ void HostGroup::OnRegistrationCompleted(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ String HostGroup::GetDisplayName(void) const { if (!m_DisplayName.IsEmpty()) @@ -68,25 +62,16 @@ String HostGroup::GetDisplayName(void) const return GetName(); } -/** - * @threadsafety Always. - */ String HostGroup::GetNotesUrl(void) const { return m_NotesUrl; } -/** - * @threadsafety Always. - */ String HostGroup::GetActionUrl(void) const { return m_ActionUrl; } -/** - * @threadsafety Always. - */ HostGroup::Ptr HostGroup::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("HostGroup", name); @@ -97,9 +82,6 @@ HostGroup::Ptr HostGroup::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ std::set HostGroup::GetMembers(void) const { std::set hosts; @@ -120,9 +102,6 @@ std::set HostGroup::GetMembers(void) const return hosts; } -/** - * @threadsafety Always. - */ void HostGroup::InvalidateMembersCache(void) { boost::mutex::scoped_lock lock(l_Mutex); @@ -140,9 +119,6 @@ void HostGroup::InvalidateMembersCache(void) l_MembersCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void HostGroup::RefreshMembersCache(void) { { diff --git a/lib/icinga/icingaapplication.cpp b/lib/icinga/icingaapplication.cpp index 4200edcd8..14381b511 100644 --- a/lib/icinga/icingaapplication.cpp +++ b/lib/icinga/icingaapplication.cpp @@ -93,9 +93,6 @@ int IcingaApplication::Main(void) return EXIT_SUCCESS; } -/** - * @threadsafety Always. - */ void IcingaApplication::OnShutdown(void) { ASSERT(!OwnsLock()); @@ -108,9 +105,6 @@ void IcingaApplication::OnShutdown(void) DumpProgramState(); } -/** - * @threadsafety Always. - */ void IcingaApplication::DumpProgramState(void) { DynamicObject::DumpObjects(GetStatePath()); @@ -121,9 +115,6 @@ IcingaApplication::Ptr IcingaApplication::GetInstance(void) return static_pointer_cast(Application::GetInstance()); } -/** - * @threadsafety Always. - */ String IcingaApplication::GetCertificateFile(void) const { ObjectLock olock(this); @@ -131,9 +122,6 @@ String IcingaApplication::GetCertificateFile(void) const return m_CertPath; } -/** - * @threadsafety Always. - */ String IcingaApplication::GetCAFile(void) const { ObjectLock olock(this); @@ -141,9 +129,6 @@ String IcingaApplication::GetCAFile(void) const return m_CAPath; } -/** - * @threadsafety Always. - */ String IcingaApplication::GetNode(void) const { ObjectLock olock(this); @@ -151,9 +136,6 @@ String IcingaApplication::GetNode(void) const return m_Node; } -/** - * @threadsafety Always. - */ String IcingaApplication::GetService(void) const { ObjectLock olock(this); @@ -161,9 +143,6 @@ String IcingaApplication::GetService(void) const return m_Service; } -/** - * @threadsafety Always. - */ String IcingaApplication::GetPidPath(void) const { ObjectLock olock(this); @@ -174,9 +153,6 @@ String IcingaApplication::GetPidPath(void) const return m_PidPath; } -/** - * @threadsafety Always. - */ String IcingaApplication::GetStatePath(void) const { ObjectLock olock(this); @@ -187,9 +163,6 @@ String IcingaApplication::GetStatePath(void) const return m_PidPath; } -/** - * @threadsafety Always. - */ Dictionary::Ptr IcingaApplication::GetMacros(void) const { ObjectLock olock(this); @@ -197,9 +170,6 @@ Dictionary::Ptr IcingaApplication::GetMacros(void) const return m_Macros; } -/** - * @threadsafety Always. - */ double IcingaApplication::GetStartTime(void) const { ObjectLock olock(this); @@ -207,9 +177,6 @@ double IcingaApplication::GetStartTime(void) const return m_StartTime; } -/** - * @threadsafety Always. - */ shared_ptr IcingaApplication::GetSSLContext(void) const { ObjectLock olock(this); @@ -217,9 +184,6 @@ shared_ptr IcingaApplication::GetSSLContext(void) const return m_SSLContext; } -/** - * @threadsafety Always. - */ Dictionary::Ptr IcingaApplication::CalculateDynamicMacros(void) { Dictionary::Ptr macros = boost::make_shared(); diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp index 53b310eff..104860376 100644 --- a/lib/icinga/macroprocessor.cpp +++ b/lib/icinga/macroprocessor.cpp @@ -27,9 +27,6 @@ using namespace icinga; -/** - * @threadsafety Always. - */ Value MacroProcessor::ResolveMacros(const Value& cmd, const Dictionary::Ptr& macros, const MacroProcessor::EscapeCallback& escapeFn) { @@ -58,9 +55,6 @@ Value MacroProcessor::ResolveMacros(const Value& cmd, const Dictionary::Ptr& mac return result; } -/** - * @threadsafety Always. - */ String MacroProcessor::InternalResolveMacros(const String& str, const Dictionary::Ptr& macros, const MacroProcessor::EscapeCallback& escapeFn) { @@ -87,9 +81,6 @@ String MacroProcessor::InternalResolveMacros(const String& str, const Dictionary return result; } -/** - * @threadsafety Always. - */ Dictionary::Ptr MacroProcessor::MergeMacroDicts(const std::vector& dicts) { Dictionary::Ptr result = boost::make_shared(); diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index 228138348..c3543383f 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -51,9 +51,6 @@ Notification::~Notification(void) Service::InvalidateNotificationsCache(); } -/** - * @threadsafety Always. - */ Notification::Ptr Notification::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("Notification", name); @@ -61,9 +58,6 @@ Notification::Ptr Notification::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ Service::Ptr Notification::GetService(void) const { Host::Ptr host = Host::GetByName(m_HostName); @@ -77,25 +71,16 @@ Service::Ptr Notification::GetService(void) const return host->GetServiceByShortName(m_Service); } -/** - * @threadsafety Always. - */ Value Notification::GetNotificationCommand(void) const { return m_NotificationCommand; } -/** - * @threadsafety Always. - */ Dictionary::Ptr Notification::GetMacros(void) const { return m_Macros; } -/** - * @threadsafety Always. - */ std::set Notification::GetUsers(void) const { std::set result; @@ -118,9 +103,6 @@ std::set Notification::GetUsers(void) const return result; } -/** - * @threadsafety Always. - */ std::set Notification::GetGroups(void) const { std::set result; @@ -143,9 +125,6 @@ std::set Notification::GetGroups(void) const return result; } -/** - * @threadsafety Always. - */ double Notification::GetNotificationInterval(void) const { if (m_NotificationInterval.IsEmpty()) @@ -154,17 +133,11 @@ double Notification::GetNotificationInterval(void) const return m_NotificationInterval; } -/** - * @threadsafety Always. - */ TimePeriod::Ptr Notification::GetNotificationPeriod(void) const { return TimePeriod::GetByName(m_NotificationPeriod); } -/** - * @threadsafety Always. - */ double Notification::GetLastNotification(void) const { if (m_LastNotification.IsEmpty()) @@ -182,9 +155,6 @@ void Notification::SetLastNotification(double time) Touch("last_notification"); } -/** - * @threadsafety Always. - */ double Notification::GetNextNotification(void) const { if (m_NextNotification.IsEmpty()) @@ -203,9 +173,6 @@ void Notification::SetNextNotification(double time) Touch("next_notification"); } -/** - * @threadsafety Always. - */ String Notification::NotificationTypeToString(NotificationType type) { switch (type) { @@ -228,9 +195,6 @@ String Notification::NotificationTypeToString(NotificationType type) } } -/** - * @threadsafety Always. - */ void Notification::BeginExecuteNotification(NotificationType type, const Dictionary::Ptr& cr, bool ignore_timeperiod) { ASSERT(!OwnsLock()); @@ -268,9 +232,6 @@ void Notification::BeginExecuteNotification(NotificationType type, const Diction } } -/** - * @threadsafety Always. - */ void Notification::BeginExecuteNotificationHelper(const Dictionary::Ptr& notificationMacros, NotificationType type, const User::Ptr& user, bool ignore_timeperiod) { @@ -320,9 +281,6 @@ void Notification::BeginExecuteNotificationHelper(const Dictionary::Ptr& notific task->Start(boost::bind(&Notification::NotificationCompletedHandler, self, _1)); } -/** - * @threadsafety Always. - */ void Notification::NotificationCompletedHandler(const ScriptTask::Ptr& task) { ASSERT(!OwnsLock()); @@ -347,9 +305,6 @@ void Notification::NotificationCompletedHandler(const ScriptTask::Ptr& task) } } -/** - * @threadsafety Always. - */ void Notification::OnAttributeChanged(const String& name) { ASSERT(!OwnsLock()); diff --git a/lib/icinga/nullchecktask.cpp b/lib/icinga/nullchecktask.cpp index 2f5d9687a..ee3a77660 100644 --- a/lib/icinga/nullchecktask.cpp +++ b/lib/icinga/nullchecktask.cpp @@ -26,9 +26,6 @@ using namespace icinga; REGISTER_SCRIPTFUNCTION(NullCheck, &NullCheckTask::ScriptFunc); -/** - * @threadsafety Always. - */ void NullCheckTask::ScriptFunc(const ScriptTask::Ptr& task, const std::vector& arguments) { if (arguments.size() < 1) diff --git a/lib/icinga/perfdatawriter.cpp b/lib/icinga/perfdatawriter.cpp index c6131ef7c..14c51ff58 100644 --- a/lib/icinga/perfdatawriter.cpp +++ b/lib/icinga/perfdatawriter.cpp @@ -40,13 +40,6 @@ PerfdataWriter::PerfdataWriter(const Dictionary::Ptr& properties) RegisterAttribute("rotation_interval", Attribute_Config, &m_RotationInterval); } -PerfdataWriter::~PerfdataWriter(void) -{ -} - -/** - * @threadsafety Always. - */ void PerfdataWriter::OnAttributeChanged(const String& name) { ASSERT(!OwnsLock()); @@ -56,9 +49,6 @@ void PerfdataWriter::OnAttributeChanged(const String& name) } } -/** - * @threadsafety Always. - */ void PerfdataWriter::Start(void) { m_Endpoint = Endpoint::MakeEndpoint("perfdata_" + GetName(), false); @@ -73,9 +63,6 @@ void PerfdataWriter::Start(void) RotateFile(); } -/** - * @threadsafety Always. - */ PerfdataWriter::Ptr PerfdataWriter::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("PerfdataWriter", name); @@ -83,9 +70,6 @@ PerfdataWriter::Ptr PerfdataWriter::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ String PerfdataWriter::GetPathPrefix(void) const { if (!m_PathPrefix.IsEmpty()) @@ -94,9 +78,6 @@ String PerfdataWriter::GetPathPrefix(void) const return Application::GetLocalStateDir() + "/cache/icinga2/perfdata/perfdata"; } -/** - * @threadsafety Always. - */ String PerfdataWriter::GetFormatTemplate(void) const { if (!m_FormatTemplate.IsEmpty()) { @@ -115,9 +96,6 @@ String PerfdataWriter::GetFormatTemplate(void) const } } -/** - * @threadsafety Always. - */ double PerfdataWriter::GetRotationInterval(void) const { if (!m_RotationInterval.IsEmpty()) @@ -126,9 +104,6 @@ double PerfdataWriter::GetRotationInterval(void) const return 30; } -/** - * @threadsafety Always. - */ void PerfdataWriter::CheckResultRequestHandler(const RequestMessage& request) { CheckResultMessage params; @@ -152,9 +127,6 @@ void PerfdataWriter::CheckResultRequestHandler(const RequestMessage& request) m_OutputFile << line << "\n"; } -/** - * @threadsafety Always. - */ void PerfdataWriter::RotateFile(void) { ObjectLock olock(this); @@ -174,9 +146,6 @@ void PerfdataWriter::RotateFile(void) Log(LogWarning, "icinga", "Could not open perfdata file '" + tempFile + "' for writing. Perfdata will be lost."); } -/** - * @threadsafety Always. - */ void PerfdataWriter::RotationTimerHandler(void) { RotateFile(); diff --git a/lib/icinga/perfdatawriter.h b/lib/icinga/perfdatawriter.h index f1d6d7a9c..72a54f9d8 100644 --- a/lib/icinga/perfdatawriter.h +++ b/lib/icinga/perfdatawriter.h @@ -41,7 +41,6 @@ public: typedef weak_ptr WeakPtr; PerfdataWriter(const Dictionary::Ptr& properties); - ~PerfdataWriter(void); static PerfdataWriter::Ptr GetByName(const String& name); diff --git a/lib/icinga/pluginchecktask.cpp b/lib/icinga/pluginchecktask.cpp index 89405d1d9..8cd2f8a03 100644 --- a/lib/icinga/pluginchecktask.cpp +++ b/lib/icinga/pluginchecktask.cpp @@ -33,9 +33,6 @@ PluginCheckTask::PluginCheckTask(const ScriptTask::Ptr& task, const Process::Ptr : m_Task(task), m_Process(process), m_Command(command) { } -/** - * @threadsafety Always. - */ void PluginCheckTask::ScriptFunc(const ScriptTask::Ptr& task, const std::vector& arguments) { if (arguments.size() < 1) @@ -57,9 +54,6 @@ void PluginCheckTask::ScriptFunc(const ScriptTask::Ptr& task, const std::vector< process->Start(boost::bind(&PluginCheckTask::ProcessFinishedHandler, ct)); } -/** - * @threadsafety Always. - */ void PluginCheckTask::ProcessFinishedHandler(PluginCheckTask ct) { ProcessResult pr; @@ -83,9 +77,6 @@ void PluginCheckTask::ProcessFinishedHandler(PluginCheckTask ct) ct.m_Task->FinishResult(result); } -/** - * @threadsafety Always. - */ ServiceState PluginCheckTask::ExitStatusToState(int exitStatus) { switch (exitStatus) { @@ -100,9 +91,6 @@ ServiceState PluginCheckTask::ExitStatusToState(int exitStatus) } } -/** - * @threadsafety Always. - */ Dictionary::Ptr PluginCheckTask::ParseCheckOutput(const String& output) { Dictionary::Ptr result = boost::make_shared(); diff --git a/lib/icinga/pluginnotificationtask.cpp b/lib/icinga/pluginnotificationtask.cpp index c15328eb2..77316c4e1 100644 --- a/lib/icinga/pluginnotificationtask.cpp +++ b/lib/icinga/pluginnotificationtask.cpp @@ -34,9 +34,6 @@ PluginNotificationTask::PluginNotificationTask(const ScriptTask::Ptr& task, cons : m_Task(task), m_Process(process), m_ServiceName(service), m_Command(command) { } -/** - * @threadsafety Always. - */ void PluginNotificationTask::ScriptFunc(const ScriptTask::Ptr& task, const std::vector& arguments) { if (arguments.size() < 1) @@ -78,9 +75,6 @@ void PluginNotificationTask::ScriptFunc(const ScriptTask::Ptr& task, const std:: process->Start(boost::bind(&PluginNotificationTask::ProcessFinishedHandler, ct)); } -/** - * @threadsafety Always. - */ void PluginNotificationTask::ProcessFinishedHandler(PluginNotificationTask ct) { ProcessResult pr; diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index ecd87405b..be53baa49 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -38,17 +38,11 @@ const double Service::CheckIntervalDivisor = 5.0; boost::signals2::signal Service::OnCheckerChanged; boost::signals2::signal Service::OnNextCheckChanged; -/** - * @threadsafety Always. - */ Value Service::GetCheckCommand(void) const { return m_CheckCommand; } -/** - * @threadsafety Always. - */ long Service::GetMaxCheckAttempts(void) const { if (m_MaxCheckAttempts.IsEmpty()) @@ -57,17 +51,11 @@ long Service::GetMaxCheckAttempts(void) const return m_MaxCheckAttempts; } -/** - * @threadsafety Always. - */ TimePeriod::Ptr Service::GetCheckPeriod(void) const { return TimePeriod::GetByName(m_CheckPeriod); } -/** - * @threadsafety Always. - */ double Service::GetCheckInterval(void) const { if (m_CheckInterval.IsEmpty()) @@ -76,9 +64,6 @@ double Service::GetCheckInterval(void) const return m_CheckInterval; } -/** - * @threadsafety Always. - */ double Service::GetRetryInterval(void) const { if (m_RetryInterval.IsEmpty()) @@ -87,50 +72,32 @@ double Service::GetRetryInterval(void) const return m_RetryInterval; } -/** - * @threadsafety Always. - */ Array::Ptr Service::GetCheckers(void) const { return m_Checkers; } -/** - * @threadsafety Always. - */ void Service::SetSchedulingOffset(long offset) { m_SchedulingOffset = offset; } -/** - * @threadsafety Always. - */ long Service::GetSchedulingOffset(void) { return m_SchedulingOffset; } -/** - * @threadsafety Always. - */ void Service::SetNextCheck(double nextCheck) { m_NextCheck = nextCheck; Touch("next_check"); } -/** - * @threadsafety Always. - */ double Service::GetNextCheck(void) { return m_NextCheck; } -/** - * @threadsafety Always. - */ void Service::UpdateNextCheck(void) { ObjectLock olock(this); @@ -151,35 +118,23 @@ void Service::UpdateNextCheck(void) SetNextCheck(now - adj + interval); } -/** - * @threadsafety Always. - */ void Service::SetCurrentChecker(const String& checker) { m_CurrentChecker = checker; Touch("current_checker"); } -/** - * @threadsafety Always. - */ String Service::GetCurrentChecker(void) const { return m_CurrentChecker; } -/** - * @threadsafety Always. - */ void Service::SetCurrentCheckAttempt(long attempt) { m_CheckAttempt = attempt; Touch("check_attempt"); } -/** - * @threadsafety Always. - */ long Service::GetCurrentCheckAttempt(void) const { if (m_CheckAttempt.IsEmpty()) @@ -188,18 +143,12 @@ long Service::GetCurrentCheckAttempt(void) const return m_CheckAttempt; } -/** - * @threadsafety Always. - */ void Service::SetState(ServiceState state) { m_State = static_cast(state); Touch("state"); } -/** - * @threadsafety Always. - */ ServiceState Service::GetState(void) const { if (m_State.IsEmpty()) @@ -225,18 +174,12 @@ ServiceState Service::GetLastState(void) const return static_cast(ivalue); } -/** - * @threadsafety Always. - */ void Service::SetStateType(StateType type) { m_StateType = static_cast(type); Touch("state_type"); } -/** - * @threadsafety Always. - */ StateType Service::GetStateType(void) const { if (m_StateType.IsEmpty()) @@ -246,18 +189,12 @@ StateType Service::GetStateType(void) const return static_cast(ivalue); } -/** - * @threadsafety Always. - */ void Service::SetLastStateType(StateType type) { m_LastStateType = static_cast(type); Touch("last_state_type"); } -/** - * @threadsafety Always. - */ StateType Service::GetLastStateType(void) const { if (m_LastStateType.IsEmpty()) @@ -267,18 +204,12 @@ StateType Service::GetLastStateType(void) const return static_cast(ivalue); } -/** - * @threadsafety Always. - */ void Service::SetLastReachable(bool reachable) { m_LastReachable = reachable; Touch("last_reachable"); } -/** - * @threadsafety Always. - */ bool Service::GetLastReachable(void) const { if (m_LastReachable.IsEmpty()) @@ -287,35 +218,23 @@ bool Service::GetLastReachable(void) const return m_LastReachable; } -/** - * @threadsafety Always. - */ void Service::SetLastCheckResult(const Dictionary::Ptr& result) { m_LastResult = result; Touch("last_result"); } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetLastCheckResult(void) const { return m_LastResult; } -/** - * @threadsafety Always. - */ void Service::SetLastStateChange(double ts) { m_LastStateChange = ts; Touch("last_state_change"); } -/** - * @threadsafety Always. - */ double Service::GetLastStateChange(void) const { if (m_LastStateChange.IsEmpty()) @@ -324,18 +243,12 @@ double Service::GetLastStateChange(void) const return m_LastStateChange; } -/** - * @threadsafety Always. - */ void Service::SetLastHardStateChange(double ts) { m_LastHardStateChange = ts; Touch("last_hard_state_change"); } -/** - * @threadsafety Always. - */ double Service::GetLastHardStateChange(void) const { if (m_LastHardStateChange.IsEmpty()) @@ -344,9 +257,6 @@ double Service::GetLastHardStateChange(void) const return m_LastHardStateChange; } -/** - * @threadsafety Always. - */ bool Service::GetEnableActiveChecks(void) const { if (m_EnableActiveChecks.IsEmpty()) @@ -355,18 +265,12 @@ bool Service::GetEnableActiveChecks(void) const return m_EnableActiveChecks; } -/** - * @threadsafety Always. - */ void Service::SetEnableActiveChecks(bool enabled) { m_EnableActiveChecks = enabled ? 1 : 0; Touch("enable_active_checks"); } -/** - * @threadsafety Always. - */ bool Service::GetEnablePassiveChecks(void) const { if (m_EnablePassiveChecks.IsEmpty()) @@ -375,18 +279,12 @@ bool Service::GetEnablePassiveChecks(void) const return m_EnablePassiveChecks; } -/** - * @threadsafety Always. - */ void Service::SetEnablePassiveChecks(bool enabled) { m_EnablePassiveChecks = enabled ? 1 : 0; Touch("enable_passive_checks"); } -/** - * @threadsafety Always. - */ bool Service::GetForceNextCheck(void) const { if (m_ForceNextCheck.IsEmpty()) @@ -395,18 +293,12 @@ bool Service::GetForceNextCheck(void) const return static_cast(m_ForceNextCheck); } -/** - * @threadsafety Always. - */ void Service::SetForceNextCheck(bool forced) { m_ForceNextCheck = forced ? 1 : 0; Touch("force_next_check"); } -/** - * @threadsafety Always. - */ void Service::ProcessCheckResult(const Dictionary::Ptr& cr) { double now = Utility::GetTime(); @@ -569,9 +461,6 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr) RequestNotifications(recovery ? NotificationRecovery : NotificationProblem, cr); } -/** - * @threadsafety Always. - */ ServiceState Service::StateFromString(const String& state) { if (state == "OK") @@ -586,9 +475,6 @@ ServiceState Service::StateFromString(const String& state) return StateUnknown; } -/** - * @threadsafety Always. - */ String Service::StateToString(ServiceState state) { switch (state) { @@ -606,9 +492,6 @@ String Service::StateToString(ServiceState state) } } -/** - * @threadsafety Always. - */ StateType Service::StateTypeFromString(const String& type) { if (type == "SOFT") @@ -617,9 +500,6 @@ StateType Service::StateTypeFromString(const String& type) return StateTypeHard; } -/** - * @threadsafety Always. - */ String Service::StateTypeToString(StateType type) { if (type == StateTypeSoft) @@ -628,9 +508,6 @@ String Service::StateTypeToString(StateType type) return "HARD"; } -/** - * @threadsafety Always. - */ bool Service::IsAllowedChecker(const String& checker) const { Array::Ptr checkers = GetCheckers(); @@ -648,9 +525,6 @@ bool Service::IsAllowedChecker(const String& checker) const return false; } -/** - * @threadsafety Always. - */ void Service::BeginExecuteCheck(const boost::function& callback) { ASSERT(!OwnsLock()); @@ -701,9 +575,6 @@ void Service::BeginExecuteCheck(const boost::function& callback) task->Start(boost::bind(&Service::CheckCompletedHandler, self, checkInfo, _1, callback)); } -/** - * @threadsafety Always. - */ void Service::CheckCompletedHandler(const Dictionary::Ptr& checkInfo, const ScriptTask::Ptr& task, const boost::function& callback) { @@ -773,9 +644,6 @@ void Service::CheckCompletedHandler(const Dictionary::Ptr& checkInfo, callback(); } -/** - * @threadsafety Always. - */ void Service::UpdateStatistics(const Dictionary::Ptr& cr) { time_t ts; @@ -792,9 +660,6 @@ void Service::UpdateStatistics(const Dictionary::Ptr& cr) CIB::UpdatePassiveChecksStatistics(ts, 1); } -/** - * @threadsafety Always. - */ double Service::CalculateExecutionTime(const Dictionary::Ptr& cr) { double execution_start = 0, execution_end = 0; @@ -810,9 +675,6 @@ double Service::CalculateExecutionTime(const Dictionary::Ptr& cr) return (execution_end - execution_start); } -/** - * @threadsafety Always. - */ double Service::CalculateLatency(const Dictionary::Ptr& cr) { double schedule_start = 0, schedule_end = 0; diff --git a/lib/icinga/service-comment.cpp b/lib/icinga/service-comment.cpp index a4cfc5972..020b4c75c 100644 --- a/lib/icinga/service-comment.cpp +++ b/lib/icinga/service-comment.cpp @@ -36,9 +36,6 @@ static bool l_CommentsCacheNeedsUpdate = false; static Timer::Ptr l_CommentsCacheTimer; static Timer::Ptr l_CommentsExpireTimer; -/** - * @threadsafety Always. - */ int Service::GetNextCommentID(void) { boost::mutex::scoped_lock lock(l_CommentMutex); @@ -46,17 +43,11 @@ int Service::GetNextCommentID(void) return l_NextCommentID; } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetComments(void) const { return m_Comments; } -/** - * @threadsafety Always. - */ String Service::AddComment(CommentType entryType, const String& author, const String& text, double expireTime) { @@ -97,18 +88,12 @@ String Service::AddComment(CommentType entryType, const String& author, return id; } -/** - * @threadsafety Always. - */ void Service::RemoveAllComments(void) { m_Comments = Empty; Touch("comments"); } -/** - * @threadsafety Always. - */ void Service::RemoveComment(const String& id) { Service::Ptr owner = GetOwnerByCommentID(id); @@ -124,9 +109,6 @@ void Service::RemoveComment(const String& id) } } -/** - * @threadsafety Always. - */ String Service::GetCommentIDFromLegacyID(int id) { boost::mutex::scoped_lock lock(l_CommentMutex); @@ -139,9 +121,6 @@ String Service::GetCommentIDFromLegacyID(int id) return it->second; } -/** - * @threadsafety Always. - */ Service::Ptr Service::GetOwnerByCommentID(const String& id) { boost::mutex::scoped_lock lock(l_CommentMutex); @@ -149,9 +128,6 @@ Service::Ptr Service::GetOwnerByCommentID(const String& id) return l_CommentsCache[id].lock(); } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetCommentByID(const String& id) { Service::Ptr owner = GetOwnerByCommentID(id); @@ -167,9 +143,6 @@ Dictionary::Ptr Service::GetCommentByID(const String& id) return Dictionary::Ptr(); } -/** - * @threadsafety Always. - */ bool Service::IsCommentExpired(const Dictionary::Ptr& comment) { double expire_time = comment->Get("expire_time"); @@ -177,9 +150,6 @@ bool Service::IsCommentExpired(const Dictionary::Ptr& comment) return (expire_time != 0 && expire_time < Utility::GetTime()); } -/** - * @threadsafety Always. - */ void Service::InvalidateCommentsCache(void) { boost::mutex::scoped_lock lock(l_CommentMutex); @@ -197,9 +167,6 @@ void Service::InvalidateCommentsCache(void) l_CommentsCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void Service::RefreshCommentsCache(void) { { @@ -261,9 +228,6 @@ void Service::RefreshCommentsCache(void) } } -/** - * @threadsafety Always. - */ void Service::RemoveExpiredComments(void) { Dictionary::Ptr comments = GetComments(); @@ -293,9 +257,6 @@ void Service::RemoveExpiredComments(void) } } -/** - * @threadsafety Always. - */ void Service::CommentsExpireTimerHandler(void) { BOOST_FOREACH(const DynamicObject::Ptr& object, DynamicType::GetObjects("Service")) { diff --git a/lib/icinga/service-downtime.cpp b/lib/icinga/service-downtime.cpp index 7d15eb1a8..fbb8b39bd 100644 --- a/lib/icinga/service-downtime.cpp +++ b/lib/icinga/service-downtime.cpp @@ -36,9 +36,6 @@ static bool l_DowntimesCacheNeedsUpdate = false; static Timer::Ptr l_DowntimesCacheTimer; static Timer::Ptr l_DowntimesExpireTimer; -/** - * @threadsafety Always. - */ int Service::GetNextDowntimeID(void) { boost::mutex::scoped_lock lock(l_DowntimeMutex); @@ -46,17 +43,11 @@ int Service::GetNextDowntimeID(void) return l_NextDowntimeID; } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetDowntimes(void) const { return m_Downtimes; } -/** - * @threadsafety Always. - */ String Service::AddDowntime(const String& author, const String& comment, double startTime, double endTime, bool fixed, const String& triggeredBy, double duration) @@ -112,9 +103,6 @@ String Service::AddDowntime(const String& author, const String& comment, return id; } -/** - * @threadsafety Always. - */ void Service::RemoveDowntime(const String& id) { Service::Ptr owner = GetOwnerByDowntimeID(id); @@ -131,9 +119,6 @@ void Service::RemoveDowntime(const String& id) owner->Touch("downtimes"); } -/** - * @threadsafety Always. - */ void Service::TriggerDowntimes(void) { Dictionary::Ptr downtimes = GetDowntimes(); @@ -158,9 +143,6 @@ void Service::TriggerDowntimes(void) } } -/** - * @threadsafety Always. - */ void Service::TriggerDowntime(const String& id) { Service::Ptr owner = GetOwnerByDowntimeID(id); @@ -188,9 +170,6 @@ void Service::TriggerDowntime(const String& id) owner->Touch("downtimes"); } -/** - * @threadsafety Always. - */ String Service::GetDowntimeIDFromLegacyID(int id) { boost::mutex::scoped_lock lock(l_DowntimeMutex); @@ -203,18 +182,12 @@ String Service::GetDowntimeIDFromLegacyID(int id) return it->second; } -/** - * @threadsafety Always. - */ Service::Ptr Service::GetOwnerByDowntimeID(const String& id) { boost::mutex::scoped_lock lock(l_DowntimeMutex); return l_DowntimesCache[id].lock(); } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetDowntimeByID(const String& id) { Service::Ptr owner = GetOwnerByDowntimeID(id); @@ -230,9 +203,6 @@ Dictionary::Ptr Service::GetDowntimeByID(const String& id) return Dictionary::Ptr(); } -/** - * @threadsafety Always. - */ bool Service::IsDowntimeActive(const Dictionary::Ptr& downtime) { double now = Utility::GetTime(); @@ -252,17 +222,11 @@ bool Service::IsDowntimeActive(const Dictionary::Ptr& downtime) return (triggerTime + downtime->Get("duration") < now); } -/** - * @threadsafety Always. - */ bool Service::IsDowntimeExpired(const Dictionary::Ptr& downtime) { return (downtime->Get("end_time") < Utility::GetTime()); } -/** - * @threadsafety Always. - */ void Service::InvalidateDowntimesCache(void) { boost::mutex::scoped_lock lock(l_DowntimeMutex); @@ -280,9 +244,6 @@ void Service::InvalidateDowntimesCache(void) l_DowntimesCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void Service::RefreshDowntimesCache(void) { { @@ -343,9 +304,6 @@ void Service::RefreshDowntimesCache(void) } } -/** - * @threadsafety Always. - */ void Service::RemoveExpiredDowntimes(void) { Dictionary::Ptr downtimes = GetDowntimes(); @@ -375,9 +333,6 @@ void Service::RemoveExpiredDowntimes(void) } } -/** - * @threadsafety Always. - */ void Service::DowntimesExpireTimerHandler(void) { BOOST_FOREACH(const DynamicObject::Ptr& object, DynamicType::GetObjects("Service")) { @@ -386,9 +341,6 @@ void Service::DowntimesExpireTimerHandler(void) } } -/** - * @threadsafety Always. - */ bool Service::IsInDowntime(void) const { Dictionary::Ptr downtimes = GetDowntimes(); diff --git a/lib/icinga/service-notification.cpp b/lib/icinga/service-notification.cpp index 016c43e46..219623f08 100644 --- a/lib/icinga/service-notification.cpp +++ b/lib/icinga/service-notification.cpp @@ -36,9 +36,6 @@ static std::map > l_NotificationsCache; static bool l_NotificationsCacheNeedsUpdate = false; static Timer::Ptr l_NotificationsCacheTimer; -/** - * @threadsafety Always. - */ void Service::RequestNotifications(NotificationType type, const Dictionary::Ptr& cr) { RequestMessage msg; @@ -55,9 +52,6 @@ void Service::RequestNotifications(NotificationType type, const Dictionary::Ptr& EndpointManager::GetInstance()->SendAnycastMessage(Endpoint::Ptr(), msg); } -/** - * @threadsafety Always. - */ void Service::SendNotifications(NotificationType type, const Dictionary::Ptr& cr) { bool force = false; @@ -93,9 +87,6 @@ void Service::SendNotifications(NotificationType type, const Dictionary::Ptr& cr } } -/** - * @threadsafety Always. - */ void Service::InvalidateNotificationsCache(void) { boost::mutex::scoped_lock lock(l_NotificationMutex); @@ -113,9 +104,6 @@ void Service::InvalidateNotificationsCache(void) l_NotificationsCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void Service::RefreshNotificationsCache(void) { { @@ -146,9 +134,6 @@ void Service::RefreshNotificationsCache(void) l_NotificationsCache.swap(newNotificationsCache); } -/** - * @threadsafety Always. - */ std::set Service::GetNotifications(void) const { std::set notifications; @@ -298,9 +283,6 @@ void Service::UpdateSlaveNotifications(void) } } -/** - * @threadsafety Always. - */ bool Service::GetEnableNotifications(void) const { if (m_EnableNotifications.IsEmpty()) @@ -309,18 +291,12 @@ bool Service::GetEnableNotifications(void) const return m_EnableNotifications; } -/** - * @threadsafety Always. - */ void Service::SetEnableNotifications(bool enabled) { m_EnableNotifications = enabled; Touch("enable_notifications"); } -/** - * @threadsafety Always. - */ bool Service::GetForceNextNotification(void) const { if (m_ForceNextNotification.IsEmpty()) @@ -329,9 +305,6 @@ bool Service::GetForceNextNotification(void) const return static_cast(m_ForceNextNotification); } -/** - * @threadsafety Always. - */ void Service::SetForceNextNotification(bool forced) { m_ForceNextNotification = forced ? 1 : 0; diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index d32a26883..95b6dec05 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -88,9 +88,6 @@ Service::~Service(void) Service::InvalidateCommentsCache(); } -/** - * @threadsafety Always. - */ void Service::OnRegistrationCompleted(void) { ASSERT(!OwnsLock()); @@ -100,9 +97,6 @@ void Service::OnRegistrationCompleted(void) InvalidateNotificationsCache(); } -/** - * @threadsafety Always. - */ String Service::GetDisplayName(void) const { if (m_DisplayName.IsEmpty()) @@ -111,9 +105,6 @@ String Service::GetDisplayName(void) const return m_DisplayName; } -/** - * @threadsafety Always. - */ Service::Ptr Service::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("Service", name); @@ -121,9 +112,6 @@ Service::Ptr Service::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ Service::Ptr Service::GetByNamePair(const String& hostName, const String& serviceName) { if (!hostName.IsEmpty()) { @@ -138,57 +126,36 @@ Service::Ptr Service::GetByNamePair(const String& hostName, const String& servic } } -/** - * @threadsafety Always. - */ Host::Ptr Service::GetHost(void) const { return Host::GetByName(m_HostName); } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::GetMacros(void) const { return m_Macros; } -/** - * @threadsafety Always. - */ Array::Ptr Service::GetHostDependencies(void) const { return m_HostDependencies; } -/** - * @threadsafety Always. - */ Array::Ptr Service::GetServiceDependencies(void) const { return m_ServiceDependencies; } -/** - * @threadsafety Always. - */ Array::Ptr Service::GetGroups(void) const { return m_ServiceGroups; } -/** - * @threadsafety Always. - */ String Service::GetHostName(void) const { return m_HostName; } -/** - * @threadsafety Always. - */ String Service::GetShortName(void) const { if (m_ShortName.IsEmpty()) @@ -197,9 +164,6 @@ String Service::GetShortName(void) const return m_ShortName; } -/** - * @threadsafety Always. - */ bool Service::IsReachable(void) const { ASSERT(!OwnsLock()); @@ -254,9 +218,6 @@ bool Service::IsReachable(void) const return true; } -/** - * @threadsafety Always. - */ AcknowledgementType Service::GetAcknowledgement(void) { ASSERT(OwnsLock()); @@ -280,26 +241,17 @@ AcknowledgementType Service::GetAcknowledgement(void) return avalue; } -/** - * @threadsafety Always. - */ void Service::SetAcknowledgement(AcknowledgementType acknowledgement) { m_Acknowledgement = acknowledgement; Touch("acknowledgement"); } -/** - * @threadsafety Always. - */ bool Service::IsAcknowledged(void) { return GetAcknowledgement() != AcknowledgementNone; } -/** - * @threadsafety Always. - */ double Service::GetAcknowledgementExpiry(void) const { if (m_AcknowledgementExpiry.IsEmpty()) @@ -308,18 +260,12 @@ double Service::GetAcknowledgementExpiry(void) const return static_cast(m_AcknowledgementExpiry); } -/** - * @threadsafety Always. - */ void Service::SetAcknowledgementExpiry(double timestamp) { m_AcknowledgementExpiry = timestamp; Touch("acknowledgement_expiry"); } -/** - * @threadsafety Always. - */ void Service::AcknowledgeProblem(AcknowledgementType type, double expiry) { { @@ -332,9 +278,6 @@ void Service::AcknowledgeProblem(AcknowledgementType type, double expiry) RequestNotifications(NotificationAcknowledgement, GetLastCheckResult()); } -/** - * @threadsafety Always. - */ void Service::ClearAcknowledgement(void) { ObjectLock olock(this); @@ -343,9 +286,6 @@ void Service::ClearAcknowledgement(void) SetAcknowledgementExpiry(0); } -/** - * @threadsafety Always. - */ void Service::OnAttributeChanged(const String& name) { ASSERT(!OwnsLock()); @@ -377,9 +317,6 @@ void Service::OnAttributeChanged(const String& name) } } -/** - * @threadsafety Always. - */ std::set Service::GetParentHosts(void) const { std::set parents; @@ -408,9 +345,6 @@ std::set Service::GetParentHosts(void) const return parents; } -/** - * @threadsafety Always. - */ std::set Service::GetParentServices(void) const { std::set parents; @@ -435,9 +369,6 @@ std::set Service::GetParentServices(void) const return parents; } -/** - * @threadsafety Always. - */ Dictionary::Ptr Service::CalculateDynamicMacros(const Dictionary::Ptr& crOverride) const { Dictionary::Ptr macros = boost::make_shared(); diff --git a/lib/icinga/servicegroup.cpp b/lib/icinga/servicegroup.cpp index 07285ae5b..954c387a0 100644 --- a/lib/icinga/servicegroup.cpp +++ b/lib/icinga/servicegroup.cpp @@ -48,9 +48,6 @@ ServiceGroup::~ServiceGroup(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ void ServiceGroup::OnRegistrationCompleted(void) { ASSERT(!OwnsLock()); @@ -58,9 +55,6 @@ void ServiceGroup::OnRegistrationCompleted(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ String ServiceGroup::GetDisplayName(void) const { if (!m_DisplayName.Get().IsEmpty()) @@ -69,25 +63,16 @@ String ServiceGroup::GetDisplayName(void) const return GetName(); } -/** - * @threadsafety Always. - */ String ServiceGroup::GetNotesUrl(void) const { return m_NotesUrl; } -/** - * @threadsafety Always. - */ String ServiceGroup::GetActionUrl(void) const { return m_ActionUrl; } -/** - * @threadsafety Always. - */ ServiceGroup::Ptr ServiceGroup::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("ServiceGroup", name); @@ -98,9 +83,6 @@ ServiceGroup::Ptr ServiceGroup::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ std::set ServiceGroup::GetMembers(void) const { std::set services; @@ -121,9 +103,6 @@ std::set ServiceGroup::GetMembers(void) const return services; } -/** - * @threadsafety Always. - */ void ServiceGroup::InvalidateMembersCache(void) { boost::mutex::scoped_lock lock(l_Mutex); @@ -141,9 +120,6 @@ void ServiceGroup::InvalidateMembersCache(void) l_MembersCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void ServiceGroup::RefreshMembersCache(void) { { diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp index 821d59a45..aa7b78d4b 100644 --- a/lib/icinga/timeperiod.cpp +++ b/lib/icinga/timeperiod.cpp @@ -57,9 +57,6 @@ void TimePeriod::Start(void) UpdateRegion(now, now + 24 * 3600); } -/** - * @threadsafety Always. - */ TimePeriod::Ptr TimePeriod::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("TimePeriod", name); diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp index d384a435a..2f679084b 100644 --- a/lib/icinga/user.cpp +++ b/lib/icinga/user.cpp @@ -40,9 +40,6 @@ User::~User(void) UserGroup::InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ void User::OnAttributeChanged(const String& name) { ASSERT(!OwnsLock()); @@ -51,9 +48,6 @@ void User::OnAttributeChanged(const String& name) UserGroup::InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ User::Ptr User::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("User", name); @@ -61,9 +55,6 @@ User::Ptr User::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ String User::GetDisplayName(void) const { if (!m_DisplayName.IsEmpty()) @@ -72,17 +63,11 @@ String User::GetDisplayName(void) const return GetName(); } -/** - * @threadsafety Always. - */ Array::Ptr User::GetGroups(void) const { return m_Groups; } -/** - * @threadsafety Always. - */ Dictionary::Ptr User::GetMacros(void) const { return m_Macros; @@ -93,9 +78,6 @@ TimePeriod::Ptr User::GetNotificationPeriod(void) const return TimePeriod::GetByName(m_NotificationPeriod); } -/** - * @threadsafety Always. - */ Dictionary::Ptr User::CalculateDynamicMacros(void) const { Dictionary::Ptr macros = boost::make_shared(); diff --git a/lib/icinga/usergroup.cpp b/lib/icinga/usergroup.cpp index 6579d0dfb..4d1dfef42 100644 --- a/lib/icinga/usergroup.cpp +++ b/lib/icinga/usergroup.cpp @@ -45,9 +45,6 @@ UserGroup::~UserGroup(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ void UserGroup::OnRegistrationCompleted(void) { ASSERT(!OwnsLock()); @@ -55,9 +52,6 @@ void UserGroup::OnRegistrationCompleted(void) InvalidateMembersCache(); } -/** - * @threadsafety Always. - */ String UserGroup::GetDisplayName(void) const { if (!m_DisplayName.IsEmpty()) @@ -66,9 +60,6 @@ String UserGroup::GetDisplayName(void) const return GetName(); } -/** - * @threadsafety Always. - */ UserGroup::Ptr UserGroup::GetByName(const String& name) { DynamicObject::Ptr configObject = DynamicObject::GetObject("UserGroup", name); @@ -79,9 +70,6 @@ UserGroup::Ptr UserGroup::GetByName(const String& name) return dynamic_pointer_cast(configObject); } -/** - * @threadsafety Always. - */ std::set UserGroup::GetMembers(void) const { std::set users; @@ -102,9 +90,6 @@ std::set UserGroup::GetMembers(void) const return users; } -/** - * @threadsafety Always. - */ void UserGroup::InvalidateMembersCache(void) { boost::mutex::scoped_lock lock(l_Mutex); @@ -122,9 +107,6 @@ void UserGroup::InvalidateMembersCache(void) l_MembersCacheNeedsUpdate = true; } -/** - * @threadsafety Always. - */ void UserGroup::RefreshMembersCache(void) { {