| 1 | #pragma once |
|---|---|
| 2 | #include <Common/ConcurrentBoundedQueue.h> |
| 3 | #include <Core/Block.h> |
| 4 | |
| 5 | |
| 6 | namespace DB |
| 7 | { |
| 8 | |
| 9 | class InternalTextLogsQueue : public ConcurrentBoundedQueue<MutableColumns> |
| 10 | { |
| 11 | public: |
| 12 | /// You should not push logs in the queue if their priority greater max_priority |
| 13 | int max_priority; |
| 14 | |
| 15 | InternalTextLogsQueue(); |
| 16 | |
| 17 | static Block getSampleBlock(); |
| 18 | static MutableColumns getSampleColumns(); |
| 19 | |
| 20 | /// Is used to pass block from remote server to the client |
| 21 | void pushBlock(Block && log_block); |
| 22 | |
| 23 | /// Converts priority from Poco::Message::Priority to a string |
| 24 | static const char * getPriorityName(int priority); |
| 25 | }; |
| 26 | |
| 27 | using InternalTextLogsQueuePtr = std::shared_ptr<InternalTextLogsQueue>; |
| 28 | |
| 29 | } |
| 30 | |
| 31 | |
| 32 | |
| 33 |