LeviLamina
Loading...
Searching...
No Matches
LevelStorageWriteBatch.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/storage/db_helpers/Category.h"
7
8// auto generated forward declare list
9// clang-format off
10class LevelStorage;
11// clang-format on
12
14public:
15 // LevelStorageWriteBatch inner types declare
16 // clang-format off
17 struct BatchEntry;
18 class PerfContext;
19 // clang-format on
20
21 // LevelStorageWriteBatch inner types define
22 struct BatchEntry {
23 public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::string>> mLatestValue;
27 ::ll::TypedStorage<1, 1, bool> mDeleted;
28 ::ll::TypedStorage<4, 4, ::DBHelpers::Category> mCategory;
29 // NOLINTEND
30 };
31
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 8, uint64> mOperation;
37 ::ll::TypedStorage<8, 8, uint64> mSize;
38 ::ll::TypedStorage<8, 32, ::std::string> mKey;
39 ::ll::TypedStorage<8, 8, char const*> mReason;
40 // NOLINTEND
41 };
42
43 using BatchContainerType = ::std::map<::std::string, ::LevelStorageWriteBatch::BatchEntry>;
44
45 using const_iterator = ::std::_Tree_const_iterator<::std::_Tree_val<
46 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>;
47
48 using iterator = ::std::_Tree_iterator<::std::_Tree_val<
49 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>;
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 24, ::std::vector<::std::function<void()>>> mFlushCallbacks;
55 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::LevelStorageWriteBatch::BatchEntry>> mBatch;
56 ::ll::TypedStorage<8, 80, ::std::mutex> mFlushCallbacksMutex;
57 // NOLINTEND
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
63
64 virtual void putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
65
66 virtual void putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
67
68 virtual void putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
69
70 virtual void
71 putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
72
73 virtual void deleteKey(::std::string const& key, ::DBHelpers::Category category);
74
75 virtual void flush(::LevelStorage& db);
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI void
82 _writeKey(::std::string const& key, ::std::shared_ptr<::std::string>&& data, ::DBHelpers::Category category);
83
84 MCAPI void addFlushCallback(::std::function<void()> callback);
85
86 MCAPI void clear();
87 // NOLINTEND
88
89public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCAPI void $dtor();
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI void $putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
99
100 MCAPI void $putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
101
102 MCAPI void $putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
103
104 MCAPI void $putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
105
106 MCAPI void $deleteKey(::std::string const& key, ::DBHelpers::Category category);
107
108 MCAPI void $flush(::LevelStorage& db);
109
110
111 // NOLINTEND
112
113public:
114 // vftables
115 // NOLINTBEGIN
116 MCAPI static void** $vftable();
117 // NOLINTEND
118};
Definition LevelStorageWriteBatch.h:32
Definition LevelStorageWriteBatch.h:13
Definition LevelStorage.h:25
Definition LevelStorageWriteBatch.h:22