| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <string> |
| 4 | #include <boost/noncopyable.hpp> |
| 5 | |
| 6 | |
| 7 | namespace DB |
| 8 | { |
| 9 | |
| 10 | |
| 11 | /** Provides that no more than one server works with one data directory. |
| 12 | */ |
| 13 | class StatusFile : private boost::noncopyable |
| 14 | { |
| 15 | public: |
| 16 | explicit StatusFile(const std::string & path_); |
| 17 | ~StatusFile(); |
| 18 | |
| 19 | private: |
| 20 | const std::string path; |
| 21 | int fd = -1; |
| 22 | }; |
| 23 | |
| 24 | |
| 25 | } |
| 26 |