mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 13:32:13 +00:00
30 lines
508 B
C++
30 lines
508 B
C++
#pragma once
|
|
|
|
#include <IO/WriteBuffer.h>
|
|
#include <libnuraft/nuraft.hxx>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class WriteBufferFromNuraftBuffer : public WriteBuffer
|
|
{
|
|
public:
|
|
WriteBufferFromNuraftBuffer();
|
|
|
|
nuraft::ptr<nuraft::buffer> getBuffer();
|
|
|
|
~WriteBufferFromNuraftBuffer() override;
|
|
|
|
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;
|
|
};
|
|
|
|
}
|