X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcomm%2FCongestionController.hpp;fp=include%2Fanna%2Fcomm%2FCongestionController.hpp;h=8d5e6139dafd318266c99d851cdacc89e50effd3;hp=8be2a78e224a5cb34703c8aa021f9db74d309924;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/comm/CongestionController.hpp b/include/anna/comm/CongestionController.hpp index 8be2a78..8d5e613 100644 --- a/include/anna/comm/CongestionController.hpp +++ b/include/anna/comm/CongestionController.hpp @@ -105,31 +105,31 @@ public: Devuelve el modo que estamos usando para calcular la carga. \return El modo que estamos usando para calcular la carga. */ - Mode::_v getMode() const throw() { return a_mode; } + Mode::_v getMode() const { return a_mode; } /** * Devuelve el número total de mensajes recibididos. * \return el número total de mensajes recibididos. */ - int getMessageCounter() const throw() { return a_messageCounter; } + int getMessageCounter() const { return a_messageCounter; } /** * Devuelve el número de mensajes tratados correctamente. * \return el número de mensajes tratados correctamente. */ - int getSuccessCounter() const throw() { return a_messageCounter - a_discardedCounter; } + int getSuccessCounter() const { return a_messageCounter - a_discardedCounter; } /** Establece el limite de carga que vamos a imponer. \param limit Limite de carga. Debe ser un valor entre 0 y 100. */ - void setLimit(const int limit) throw(); + void setLimit(const int limit) ; /** Establece el modo en que vamos a calcular la carga. \param mode Modo usado para calcular la carga. */ - void setMode(const Mode::_v mode) throw() { + void setMode(const Mode::_v mode) { if((a_mode = mode) == Mode::Auto) { WHEN_MULTITHREAD(a_effectiveMode = Mode::Local); WHEN_SINGLETHREAD(a_effectiveMode = Mode::Global); @@ -141,7 +141,7 @@ public: Devuelve \em true si esta instancia ha recibido datos o \em false en otro caso. \return \em true si esta instancia ha recibido datos o \em false en otro caso. */ - bool isEmpty() const throw() { return a_avgWorkload.isEmpty(); } + bool isEmpty() const { return a_avgWorkload.isEmpty(); } /** * Establece el nº máximo de bytes que deberían tener los socket en la cola de entrada. @@ -151,7 +151,7 @@ public: * [#comm::Communicator::getReadingChunkSize, min (#comm::Communicator::getReadingChunkSize * 4, #MaxPendingBytes)] * \endcode */ - void setMaxPendingBytes(const int maxPendingBytes) throw(RuntimeException); + void setMaxPendingBytes(const int maxPendingBytes) noexcept(false); /** Devuelve el consejo sobre si debemos tratar/o no el ultimo mensaje recibido @@ -161,7 +161,7 @@ public: , Advice::None para indicar que todavia no tiene datos para tomar una decision clara o Advice::Discard para indicar que debemos descartar. */ - Advice::_v getAdvice(const ClientSocket& clientSocket) throw(); + Advice::_v getAdvice(const ClientSocket& clientSocket) ; /** Devuelve el consejo sobre si debemos tratar/o no el ultimo mensaje recibido @@ -171,7 +171,7 @@ public: , Advice::None para indicar que todavia no tiene datos para tomar una decision clara o Advice::Discard para indicar que debemos descartar. */ - Advice::_v getAdvice(const ClientSocket* clientSocket) throw() { + Advice::_v getAdvice(const ClientSocket* clientSocket) { return (clientSocket == NULL) ? Advice::Process : getAdvice(*clientSocket); } @@ -187,7 +187,7 @@ public: * \see #getLoad * \see #getLevel */ - Workload getAccumulatedWorkload() const throw(); + Workload getAccumulatedWorkload() const ; /** * Devuelve información sobre las estadísticas de carga del socket recibido como parámetro. @@ -203,25 +203,25 @@ public: * \see #getLoad * \see #getLevel */ - Workload getCurrentWorkload(const ClientSocket& clientSocket) const throw(); + Workload getCurrentWorkload(const ClientSocket& clientSocket) const ; /** Devuelve un documento XML con la informacion relevante sobre esta clase. \return un documento XML con la informacion relevante sobre esta clase. */ - xml::Node* asXML(xml::Node* parent) const throw(); + xml::Node* asXML(xml::Node* parent) const ; /** * Extrae la carga media que soporta es proceso. La carga es un número en [0, 100]. * \return la carga media que soporta es proceso. La carga es un número en [0, 100]. */ - static int getLoad(const Workload& workload) throw() { return workload.second; } + static int getLoad(const Workload& workload) { return workload.second; } /** * Extrae el nivel de carga en la que está el proceso. El nivel de carga es un número en [0, 4]. * \return el nivel de carga en la que está el proceso. El nivel de carga es un número en [0, 4]. */ - static int getLevel(const Workload& workload) throw() { return workload.first; } + static int getLevel(const Workload& workload) { return workload.first; } private: static const Millisecond DelayTrace; @@ -247,13 +247,13 @@ private: int a_incomingSocketCounter; Millisecond a_tickTime; - void incrementIncomingSocket() throw(RuntimeException); - void decrementIncomingSocket() throw(RuntimeException); + void incrementIncomingSocket() noexcept(false); + void decrementIncomingSocket() noexcept(false); CongestionController(); CongestionController(const CongestionController&); - int calculeWorkload(const ClientSocket&) const throw(); + int calculeWorkload(const ClientSocket&) const ; friend class Singleton ;