aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/direct_io.h
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.ru>2022-02-10 16:49:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:46 +0300
commitff241e1daf76d79ed38015cdb76d55eb3a33ac27 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/stream/direct_io.h
parent07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (diff)
downloadydb-ff241e1daf76d79ed38015cdb76d55eb3a33ac27.tar.gz
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/stream/direct_io.h')
-rw-r--r--util/stream/direct_io.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/util/stream/direct_io.h b/util/stream/direct_io.h
index 0c55f15a95..2e1f2e07dd 100644
--- a/util/stream/direct_io.h
+++ b/util/stream/direct_io.h
@@ -1,43 +1,43 @@
-#pragma once
-
-#include "input.h"
-#include "output.h"
-#include <util/system/direct_io.h>
-
+#pragma once
+
+#include "input.h"
+#include "output.h"
+#include <util/system/direct_io.h>
+
class TRandomAccessFileInput: public IInputStream {
-public:
- TRandomAccessFileInput(TDirectIOBufferedFile& file, ui64 position);
-
-protected:
+public:
+ TRandomAccessFileInput(TDirectIOBufferedFile& file, ui64 position);
+
+protected:
size_t DoRead(void* buf, size_t len) override;
size_t DoSkip(size_t len) override;
-
-private:
- TDirectIOBufferedFile& File;
- ui64 Position;
-};
-
+
+private:
+ TDirectIOBufferedFile& File;
+ ui64 Position;
+};
+
class TRandomAccessFileOutput: public IOutputStream {
-public:
- TRandomAccessFileOutput(TDirectIOBufferedFile& file);
-
+public:
+ TRandomAccessFileOutput(TDirectIOBufferedFile& file);
+
TRandomAccessFileOutput(TRandomAccessFileOutput&&) noexcept = default;
TRandomAccessFileOutput& operator=(TRandomAccessFileOutput&&) noexcept = default;
-protected:
+protected:
TDirectIOBufferedFile* File;
-
-private:
+
+private:
void DoWrite(const void* buf, size_t len) override;
void DoFlush() override;
-};
-
-class TBufferedFileOutputEx: public TRandomAccessFileOutput {
-public:
+};
+
+class TBufferedFileOutputEx: public TRandomAccessFileOutput {
+public:
TBufferedFileOutputEx(const TString& path, EOpenMode oMode, size_t buflen = 1 << 17);
-
-private:
+
+private:
void DoFlush() override;
void DoFinish() override;
- THolder<TDirectIOBufferedFile> FileHolder;
-};
+ THolder<TDirectIOBufferedFile> FileHolder;
+};