2020-05-09 21:24:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Disks/IVolume.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class SingleDiskVolume : public IVolume
|
|
|
|
{
|
|
|
|
public:
|
2020-10-20 15:10:24 +00:00
|
|
|
SingleDiskVolume(const String & name_, DiskPtr disk, size_t max_data_part_size_ = 0): IVolume(name_, {disk}, max_data_part_size_)
|
2020-05-09 21:24:15 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ReservationPtr reserve(UInt64 bytes) override
|
|
|
|
{
|
|
|
|
return disks[0]->reserve(bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
VolumeType getType() const override { return VolumeType::SINGLE_DISK; }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
using VolumeSingleDiskPtr = std::shared_ptr<SingleDiskVolume>;
|
2020-05-28 05:38:55 +00:00
|
|
|
using VolumesSingleDiskPtr = std::vector<VolumeSingleDiskPtr>;
|
2020-05-09 21:24:15 +00:00
|
|
|
|
|
|
|
}
|