3 #include <Poco/Timespan.h>
4 #include <Poco/Timestamp.h>
10 const static int TRESHOLD_UNLIMITED = 0;
16 FailDetector(
const unsigned int failsTreshold = TRESHOLD_UNLIMITED);
71 unsigned int m_failsTreshold;
72 Poco::Timestamp m_timeOfLastFail;
73 Poco::Timestamp m_timeOfFailure;
Definition: FailDetector.h:8
bool isFailed() const
Definition: FailDetector.cpp:36
Poco::Timestamp timeOfFailure() const
Definition: FailDetector.cpp:51
bool isGoingToFail() const
Definition: FailDetector.cpp:31
Poco::Timestamp timeOfLastFail() const
Definition: FailDetector.cpp:41
bool lastFailBefore(const Poco::Timespan &timeout) const
Definition: FailDetector.cpp:46
FailDetector(const unsigned int failsTreshold=TRESHOLD_UNLIMITED)
Definition: FailDetector.cpp:6
void fail()
Definition: FailDetector.cpp:16
void success()
Definition: FailDetector.cpp:26
bool failedBefore(const Poco::Timespan &timeout) const
Definition: FailDetector.cpp:56