2018-06-06 20:57:07 +00:00
|
|
|
#pragma once
|
2018-06-18 16:30:26 +00:00
|
|
|
#include <Common/ConcurrentBoundedQueue.h>
|
|
|
|
#include <Core/Block.h>
|
2018-06-06 20:57:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-06-15 17:32:35 +00:00
|
|
|
class InternalTextLogsQueue : public ConcurrentBoundedQueue<MutableColumns>
|
2018-06-06 20:57:07 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/// You should not push logs in the queue if their priority greater max_priority
|
|
|
|
int max_priority;
|
|
|
|
|
2018-06-15 17:32:35 +00:00
|
|
|
InternalTextLogsQueue();
|
2018-06-06 20:57:07 +00:00
|
|
|
|
|
|
|
static Block getSampleBlock();
|
|
|
|
static MutableColumns getSampleColumns();
|
|
|
|
|
2018-06-18 16:30:26 +00:00
|
|
|
/// Is used to pass block from remote server to the client
|
|
|
|
void pushBlock(Block && log_block);
|
|
|
|
|
2018-06-06 20:57:07 +00:00
|
|
|
/// Converts priority from Poco::Message::Priority to a string
|
2018-06-15 13:45:19 +00:00
|
|
|
static const char * getPriorityName(int priority);
|
2018-06-06 20:57:07 +00:00
|
|
|
};
|
|
|
|
|
2018-06-15 17:32:35 +00:00
|
|
|
using InternalTextLogsQueuePtr = std::shared_ptr<InternalTextLogsQueue>;
|
2018-06-06 20:57:07 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|