1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-02-11 12:24:40 +00:00
parent 509f005be7
commit 7c808317dc
1367 changed files with 394342 additions and 413129 deletions

View File

@@ -24,57 +24,56 @@
#include "bytestream.h"
#include "bytestreampool.h"
namespace idbdatafile
namespace idbdatafile
{
class SMComm : public boost::noncopyable
{
public:
// This is a singleton. Get it with get()
static SMComm *get();
/* Open currently returns a stat struct so SMDataFile can set its initial position, otherwise
behaves how you'd think. */
int open(const std::string &filename, const int mode, struct stat *statbuf);
ssize_t pread(const std::string &filename, void *buf, const size_t count, const off_t offset);
ssize_t pwrite(const std::string &filename, const void *buf, const size_t count, const off_t offset);
/* append exists for cases where the file is open in append mode. A normal write won't work
because the file position/size may be out of date if there are multiple writers. */
ssize_t append(const std::string &filename, const void *buf, const size_t count);
int unlink(const std::string &filename);
int stat(const std::string &filename, struct stat *statbuf);
// added this one because it should be trivial to implement in SM, and prevents a large
// operation in SMDataFile.
int truncate(const std::string &filename, const off64_t length);
int listDirectory(const std::string &path, std::list<std::string> *entries);
// health indicator. 0 = processes are talking to each other and SM has read/write access to
// the specified S3 bucket. Need to define specific error codes.
int ping();
int sync();
public:
// This is a singleton. Get it with get()
static SMComm* get();
int copyFile(const std::string &file1, const std::string &file2);
virtual ~SMComm();
private:
SMComm();
std::string getAbsFilename(const std::string &filename);
SocketPool sockets;
messageqcpp::ByteStreamPool buffers;
std::string cwd;
/* Open currently returns a stat struct so SMDataFile can set its initial position, otherwise
behaves how you'd think. */
int open(const std::string& filename, const int mode, struct stat* statbuf);
ssize_t pread(const std::string& filename, void* buf, const size_t count, const off_t offset);
ssize_t pwrite(const std::string& filename, const void* buf, const size_t count, const off_t offset);
/* append exists for cases where the file is open in append mode. A normal write won't work
because the file position/size may be out of date if there are multiple writers. */
ssize_t append(const std::string& filename, const void* buf, const size_t count);
int unlink(const std::string& filename);
int stat(const std::string& filename, struct stat* statbuf);
// added this one because it should be trivial to implement in SM, and prevents a large
// operation in SMDataFile.
int truncate(const std::string& filename, const off64_t length);
int listDirectory(const std::string& path, std::list<std::string>* entries);
// health indicator. 0 = processes are talking to each other and SM has read/write access to
// the specified S3 bucket. Need to define specific error codes.
int ping();
int sync();
int copyFile(const std::string& file1, const std::string& file2);
virtual ~SMComm();
private:
SMComm();
std::string getAbsFilename(const std::string& filename);
SocketPool sockets;
messageqcpp::ByteStreamPool buffers;
std::string cwd;
};
}
} // namespace idbdatafile
#endif