ClickHouse/src/Coordination/WriteBufferFromNuraftBuffer.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
508 B
C++
Raw Normal View History

2021-01-19 09:40:25 +00:00
#pragma once
#include <IO/WriteBuffer.h>
2021-10-27 23:10:39 +00:00
#include <libnuraft/nuraft.hxx>
2021-01-19 09:40:25 +00:00
namespace DB
{
class WriteBufferFromNuraftBuffer : public WriteBuffer
{
public:
WriteBufferFromNuraftBuffer();
nuraft::ptr<nuraft::buffer> getBuffer();
~WriteBufferFromNuraftBuffer() override;
2021-11-10 22:58:56 +00:00
private:
void finalizeImpl() override final;
void nextImpl() override;
nuraft::ptr<nuraft::buffer> buffer;
static constexpr size_t initial_size = 32;
static constexpr size_t size_multiplier = 2;
2021-01-19 09:40:25 +00:00
};
}