Add OnMaxCheckAttemptsChanged event

refs #5219
This commit is contained in:
Michael Friedrich 2014-08-26 13:18:02 +02:00
parent 552d0a7d18
commit 0db1b5095d
2 changed files with 6 additions and 2 deletions

View File

@ -46,6 +46,7 @@ boost::signals2::signal<void (const Checkable::Ptr&, bool, const MessageOrigin&)
boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> Checkable::OnCheckIntervalChanged;
boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> Checkable::OnRetryIntervalChanged;
boost::signals2::signal<void (const Checkable::Ptr&, const CheckCommand::Ptr&, const MessageOrigin&)> Checkable::OnCheckCommandChanged;
boost::signals2::signal<void (const Checkable::Ptr&, int, const MessageOrigin&)> Checkable::OnMaxCheckAttemptsChanged;
boost::signals2::signal<void (const Checkable::Ptr&, FlappingState)> Checkable::OnFlappingChanged;
CheckCommand::Ptr Checkable::GetCheckCommand(void) const
@ -220,9 +221,11 @@ int Checkable::GetMaxCheckAttempts(void) const
return GetMaxCheckAttemptsRaw();
}
void Checkable::SetMaxCheckAttempts(int attempts)
void Checkable::SetMaxCheckAttempts(int attempts, const MessageOrigin& origin)
{
SetOverrideMaxCheckAttempts(attempts);
OnMaxCheckAttemptsChanged(GetSelf(), attempts, origin);
}
void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrigin& origin)

View File

@ -110,7 +110,7 @@ public:
void SetRetryInterval(double interval, const MessageOrigin& origin = MessageOrigin());
int GetMaxCheckAttempts(void) const;
void SetMaxCheckAttempts(int attempts);
void SetMaxCheckAttempts(int attempts, const MessageOrigin& origin = MessageOrigin());
long GetSchedulingOffset(void);
void SetSchedulingOffset(long offset);
@ -157,6 +157,7 @@ public:
static boost::signals2::signal<void (const Checkable::Ptr&, bool, const MessageOrigin&)> OnEnableEventHandlerChanged;
static boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> OnCheckIntervalChanged;
static boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> OnRetryIntervalChanged;
static boost::signals2::signal<void (const Checkable::Ptr&, int, const MessageOrigin&)> OnMaxCheckAttemptsChanged;
static boost::signals2::signal<void (const Checkable::Ptr&, const shared_ptr<EventCommand>&, const MessageOrigin&)> OnEventCommandChanged;
static boost::signals2::signal<void (const Checkable::Ptr&, const shared_ptr<CheckCommand>&, const MessageOrigin&)> OnCheckCommandChanged;