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 ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
75 saveData(::std::string
const&, ::std::string&&, ::DBHelpers::Category) = 0;
81 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
82 deleteData(::std::string
const&, ::DBHelpers::Category) = 0;
85 virtual void getStatistics(::std::string&, ::LevelStorage::StatsType)
const = 0;
88 virtual bool clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
91 virtual ::Core::LevelStorageResult getLevelStorageState()
const = 0;
94 virtual ::ContentIdentity
const* getContentIdentity()
const = 0;
97 virtual void startShutdown() = 0;
100 virtual bool isShuttingDown()
const = 0;
103 virtual bool checkShutdownDone() = 0;
106 virtual bool loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
109 virtual ::Core::LevelStorageResult getState()
const = 0;
112 virtual ::std::vector<::SnapshotFilenameAndLength> createSnapshot(::std::string
const&,
bool) = 0;
115 virtual void releaseSnapshot() = 0;
118 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> compactStorage() = 0;
121 virtual void syncAndSuspendStorage() = 0;
124 virtual void resumeStorage() = 0;
127 virtual void setFlushAllowed(
bool) = 0;
130 virtual void flushToPermanentStorage() = 0;
133 virtual void freeCaches();
136 virtual void setCompactionCallback(::std::function<
void(::CompactionStatus)>) = 0;
139 virtual void setCriticalSyncSaveCallback(::std::function<
void()>) = 0;
142 virtual void corruptLevel();
148 MCAPI ::std::string getServerId(
::Player const& client,
bool isXboxLive);
150 MCAPI ::std::vector<::std::string> loadAllPlayerIDs(
bool includeLocalPlayer)
const;
152 MCAPI ::std::unique_ptr<::CompoundTag> loadServerPlayerData(
::Player const& client,
bool isXboxLive);
156 MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
157 saveData(::std::string
const& key,
::CompoundTag const& tag, ::DBHelpers::Category category);
163 MCAPI static ::std::string
const& LEGACY_CONSOLE_PLAYER_PREFIX();
165 MCAPI static ::std::string
const& LOCAL_PLAYER_TAG();
177 MCFOLD
bool $loadedSuccessfully()
const;
179 MCAPI
bool $clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
181 MCFOLD
bool $loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
183 MCFOLD
void $freeCaches();
185 MCFOLD
void $corruptLevel();
Definition ContentIdentity.h:8