ClickHouse/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.h
2017-06-13 07:13:20 +03:00

33 lines
616 B
C++

#pragma once
#include <DataStreams/IBlockOutputStream.h>
#include <Core/Types.h>
namespace Poco { class Logger; }
namespace DB
{
class StorageReplicatedMergeTree;
class ReplicatedMergeTreeBlockOutputStream : public IBlockOutputStream
{
public:
ReplicatedMergeTreeBlockOutputStream(StorageReplicatedMergeTree & storage_,
size_t quorum_, size_t quorum_timeout_ms_);
void write(const Block & block) override;
private:
StorageReplicatedMergeTree & storage;
size_t quorum;
size_t quorum_timeout_ms;
size_t block_index = 0;
using Logger = Poco::Logger;
Logger * log;
};
}