mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-23 17:57:54 +02:00
parent
f6f5fd5dda
commit
3164a45f5f
@ -201,23 +201,6 @@ void TimePeriod::PurgeSegments(double end)
|
|||||||
SetSegments(newSegments);
|
SetSegments(newSegments);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include)
|
|
||||||
{
|
|
||||||
Log(LogDebug, "TimePeriod")
|
|
||||||
<< "Merge TimePeriod '" << GetName() << "' with '" << timeperiod->GetName() << "' "
|
|
||||||
<< "Method: " << (include ? "include" : "exclude");
|
|
||||||
|
|
||||||
Array::Ptr segments = timeperiod->GetSegments();
|
|
||||||
|
|
||||||
if (segments) {
|
|
||||||
ObjectLock dlock(segments);
|
|
||||||
ObjectLock ilock(this);
|
|
||||||
for (const Dictionary::Ptr& segment : segments) {
|
|
||||||
include ? AddSegment(segment) : RemoveSegment(segment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
||||||
{
|
{
|
||||||
if (clearExisting) {
|
if (clearExisting) {
|
||||||
|
@ -37,8 +37,6 @@ private:
|
|||||||
void RemoveSegment(const Dictionary::Ptr& segment);
|
void RemoveSegment(const Dictionary::Ptr& segment);
|
||||||
void PurgeSegments(double end);
|
void PurgeSegments(double end);
|
||||||
|
|
||||||
void Merge(const TimePeriod::Ptr& timeperiod, bool include = true);
|
|
||||||
|
|
||||||
void Dump();
|
void Dump();
|
||||||
|
|
||||||
static void UpdateTimerHandler();
|
static void UpdateTimerHandler();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user