mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Eventqueue: Remove unused code
This commit is contained in:
parent
e86e3cc234
commit
a7873da89d
@ -90,25 +90,6 @@ void EventQueue::SetFilter(std::unique_ptr<Expression> filter)
|
|||||||
m_Filter.swap(filter);
|
m_Filter.swap(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary::Ptr EventQueue::WaitForEvent(void *client, double timeout)
|
|
||||||
{
|
|
||||||
boost::mutex::scoped_lock lock(m_Mutex);
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
auto it = m_Events.find(client);
|
|
||||||
ASSERT(it != m_Events.end());
|
|
||||||
|
|
||||||
if (!it->second.empty()) {
|
|
||||||
Dictionary::Ptr result = *it->second.begin();
|
|
||||||
it->second.pop_front();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_CV.timed_wait(lock, boost::posix_time::milliseconds(long(timeout * 1000))))
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<EventQueue::Ptr> EventQueue::GetQueuesForType(const String& type)
|
std::vector<EventQueue::Ptr> EventQueue::GetQueuesForType(const String& type)
|
||||||
{
|
{
|
||||||
EventQueueRegistry::ItemMap queues = EventQueueRegistry::GetInstance()->GetItems();
|
EventQueueRegistry::ItemMap queues = EventQueueRegistry::GetInstance()->GetItems();
|
||||||
|
@ -36,8 +36,6 @@ public:
|
|||||||
void SetTypes(const std::set<String>& types);
|
void SetTypes(const std::set<String>& types);
|
||||||
void SetFilter(std::unique_ptr<Expression> filter);
|
void SetFilter(std::unique_ptr<Expression> filter);
|
||||||
|
|
||||||
Dictionary::Ptr WaitForEvent(void *client, double timeout = 5);
|
|
||||||
|
|
||||||
static std::vector<EventQueue::Ptr> GetQueuesForType(const String& type);
|
static std::vector<EventQueue::Ptr> GetQueuesForType(const String& type);
|
||||||
static void UnregisterIfUnused(const String& name, const EventQueue::Ptr& queue);
|
static void UnregisterIfUnused(const String& name, const EventQueue::Ptr& queue);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user