X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FLocalServer.hpp;h=e0ce97c7e2ad77345178c0c987a6118276c47392;hb=8a597c7ccbe2986f505fd70258e4b59ecef4166f;hp=d83dd31bd6663a6a07e8b4d50a8efa2504dc2403;hpb=c6b62fd814b6e5b4e3ba65b6f092f6aa4e1d298d;p=anna.git diff --git a/include/anna/diameter.comm/LocalServer.hpp b/include/anna/diameter.comm/LocalServer.hpp index d83dd31..e0ce97c 100644 --- a/include/anna/diameter.comm/LocalServer.hpp +++ b/include/anna/diameter.comm/LocalServer.hpp @@ -17,10 +17,13 @@ // STL #include #include +#include +// Project #include -#include #include +#include +#include namespace anna { @@ -65,9 +68,7 @@ class LocalServer { Engine *a_engine; // Statistics - int a_processing_time__StatisticConceptId; // request from local server (dpr's, etc.) - int a_received_message_size__StatisticConceptId; - anna::statistics::Accumulator *a_statisticsAccumulator; + MessageStatistics a_messageStatistics; void initializeStatisticResources() throw(); void resetStatistics() throw(); @@ -143,6 +144,14 @@ public: */ void setDescription(const std::string description) throw() { a_description = description; } + /** + Set timeout to consider failed a request. + \param v Requests class code. + \param millisecond Milliseconds wait before considering the requests failed. + + Timers are internally managed and automatically activated. + */ + void setClassCodeTimeout(const ClassCode::_v v, const anna::Millisecond & millisecond) throw(); /** Sets the server socket optional category @@ -343,10 +352,10 @@ public: anna::xml::Node* asXML(anna::xml::Node* parent) const throw(); // Statistics - void updateProcessingTimeStatisticConcept(const double &value) throw(); - void updateReceivedMessageSizeStatisticConcept(const double &value) throw(); - int getProcessingTimeStatisticConcept() const throw() { return a_processing_time__StatisticConceptId; } - int getReceivedMessageSizeStatisticConcept() const throw() { return a_received_message_size__StatisticConceptId; } + void updateProcessingTimeStatisticConcept(const double &value, const anna::diameter::CommandId &cid) throw(); + void updateReceivedMessageSizeStatisticConcept(const double &value, const anna::diameter::CommandId &cid) throw(); +// int getProcessingTimeStatisticConcept() const throw() { return a_processing_time__StatisticConceptId; } +// int getReceivedMessageSizeStatisticConcept() const throw() { return a_received_message_size__StatisticConceptId; } protected: