28 enum class StatsType : uint {
41 virtual void addStorageObserver(::std::unique_ptr<::LevelStorageObserver>) = 0;
43 virtual bool loadedSuccessfully()
const;
45 virtual ::std::unique_ptr<::CompoundTag> getCompoundTag(::std::string
const&, ::DBHelpers::Category) = 0;
47 virtual bool hasKey(::std::string_view, ::DBHelpers::Category)
const = 0;
49 virtual void forEachKeyWithPrefix(
51 ::DBHelpers::Category,
52 ::std::function<
void(::std::string_view, ::std::string_view)>
const&
57 virtual ::std::unique_ptr<::ChunkSource> createChunkStorage(::std::unique_ptr<::ChunkSource>, ::StorageVersion) = 0;
61 virtual ::Core::PathBuffer<::std::string>
const& getFullPath()
const = 0;
63 virtual ::Bedrock::Threading::Async<void>
64 saveData(::std::string
const&, ::std::string&&, ::DBHelpers::Category) = 0;
68 virtual ::Bedrock::Threading::Async<void> deleteData(::std::string
const&, ::DBHelpers::Category) = 0;
70 virtual void getStatistics(::std::string&, ::LevelStorage::StatsType)
const = 0;
72 virtual bool clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
74 virtual ::Core::LevelStorageResult getLevelStorageState()
const = 0;
76 virtual ::ContentIdentity
const* getContentIdentity()
const = 0;
78 virtual void startShutdown() = 0;
80 virtual bool isShuttingDown()
const = 0;
82 virtual bool checkShutdownDone() = 0;
84 virtual bool loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
86 virtual ::Core::LevelStorageResult getState()
const = 0;
88 virtual ::std::vector<::SnapshotFilenameAndLength> createSnapshot(::std::string
const&,
bool) = 0;
90 virtual void releaseSnapshot() = 0;
92 virtual ::Bedrock::Threading::Async<void> compactStorage() = 0;
94 virtual void syncAndSuspendStorage() = 0;
96 virtual void resumeStorage() = 0;
98 virtual void setFlushAllowed(
bool) = 0;
100 virtual void flushToPermanentStorage() = 0;
102 virtual void freeCaches();
104 virtual void setCompactionCallback(::std::function<
void(::CompactionStatus)>) = 0;
106 virtual void setCriticalSyncSaveCallback(::std::function<
void()>) = 0;
108 virtual void corruptLevel();
114 MCAPI_C ::std::unique_ptr<::LevelStorageWriteBatch> createWriteBatch();
116 MCAPI ::std::string getServerId(
::Player const& client,
bool isXboxLive);
118 MCAPI ::std::vector<::std::string> loadAllPlayerIDs(
bool includeLocalPlayer)
const;
120 MCAPI ::std::unique_ptr<::CompoundTag> loadServerPlayerData(
::Player const& client,
bool isXboxLive);
124 MCAPI ::Bedrock::Threading::Async<void>
125 saveData(::std::string
const& key,
::CompoundTag const& tag, ::DBHelpers::Category category);
131 MCAPI static ::std::string
const& LEGACY_CONSOLE_PLAYER_PREFIX();
133 MCAPI static ::std::string
const& LOCAL_PLAYER_TAG();
145 MCFOLD
bool $loadedSuccessfully()
const;
147 MCAPI
bool $clonePlayerData(::std::string_view fromKey, ::std::string_view toKey);
149 MCFOLD
bool $loadData(::std::string_view key, ::std::string&
buffer, ::DBHelpers::Category category)
const;
151 MCFOLD
void $freeCaches();
153 MCFOLD
void $corruptLevel();
Definition ContentIdentity.h:8