28 enum class StatsType : uint {
43 virtual void addStorageObserver(::std::unique_ptr<::LevelStorageObserver>) = 0;
46 virtual bool loadedSuccessfully()
const;
49 virtual ::std::unique_ptr<::CompoundTag> getCompoundTag(::std::string
const&, ::DBHelpers::Category) = 0;
52 virtual bool hasKey(::std::string_view, ::DBHelpers::Category)
const = 0;
55 virtual void forEachKeyWithPrefix(
57 ::DBHelpers::Category,
58 ::std::function<
void(::std::string_view, ::std::string_view)>
const&
65 virtual ::std::unique_ptr<::ChunkSource> createChunkStorage(::std::unique_ptr<::ChunkSource>, ::StorageVersion) = 0;
71 virtual ::Core::PathBuffer<::std::string>
const& getFullPath()
const = 0;
74 virtual ::Bedrock::Threading::Async<void>
75 saveData(::std::string
const&, ::std::string&&, ::DBHelpers::Category) = 0;
81 virtual ::Bedrock::Threading::Async<void> deleteData(::std::string
const&, ::DBHelpers::Category) = 0;
84 virtual void getStatistics(::std::string&, ::LevelStorage::StatsType)
const = 0;
87 virtual bool clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
90 virtual ::Core::LevelStorageResult getLevelStorageState()
const = 0;
93 virtual ::ContentIdentity
const* getContentIdentity()
const = 0;
96 virtual void startShutdown() = 0;
99 virtual bool isShuttingDown()
const = 0;
102 virtual bool checkShutdownDone() = 0;
105 virtual bool loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
108 virtual ::Core::LevelStorageResult getState()
const = 0;
111 virtual ::std::vector<::SnapshotFilenameAndLength> createSnapshot(::std::string
const&,
bool) = 0;
114 virtual void releaseSnapshot() = 0;
117 virtual ::Bedrock::Threading::Async<void> compactStorage() = 0;
120 virtual void syncAndSuspendStorage() = 0;
123 virtual void resumeStorage() = 0;
126 virtual void setFlushAllowed(
bool) = 0;
129 virtual void flushToPermanentStorage() = 0;
132 virtual void freeCaches();
135 virtual void setCompactionCallback(::std::function<
void(::CompactionStatus)>) = 0;
138 virtual void setCriticalSyncSaveCallback(::std::function<
void()>) = 0;
141 virtual void corruptLevel();
147 MCAPI ::std::string getServerId(
::Player const& client,
bool isXboxLive);
149 MCAPI ::std::vector<::std::string> loadAllPlayerIDs(
bool includeLocalPlayer)
const;
151 MCAPI ::std::unique_ptr<::CompoundTag> loadServerPlayerData(
::Player const& client,
bool isXboxLive);
155 MCAPI ::Bedrock::Threading::Async<void>
156 saveData(::std::string
const& key,
::CompoundTag const& tag, ::DBHelpers::Category category);
162 MCAPI static ::std::string
const& LEGACY_CONSOLE_PLAYER_PREFIX();
164 MCAPI static ::std::string
const& LOCAL_PLAYER_TAG();
176 MCFOLD
bool $loadedSuccessfully()
const;
178 MCAPI
bool $clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
180 MCFOLD
bool $loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
182 MCFOLD
void $freeCaches();
184 MCFOLD
void $corruptLevel();
Definition ContentIdentity.h:8