Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
Core::FileStorageArea Class Referenceabstract
Inheritance diagram for Core::FileStorageArea:

Classes

struct  StorageAreaSpaceInfo

Public Types

enum class  FlushableLevelDbEnvType : int { None = 0 , InMemory = 1 , StorageArea = 2 }

Public Member Functions

virtual ::std::unique_ptr<::Core::FileSystemImpl > createTransaction (::Core::FileAccessType accessType)=0
virtual ::std::unique_ptr<::Core::FileSystemImpl > createTransaction (::Core::FileAccessType fileAccessType, ::Core::TransactionFlags)
virtual bool supportsSizeQuery () const =0
virtual uint64 getTotalSize () const =0
virtual::Core::Result getUsedSize (uint64 &outUsedSize)=0
virtual void setUsedSizeOverride (uint64 fileSize)
virtual void clearUsedSizeOverride ()
virtual void notifyChangeInFileSize (int64 changeInSize, int64 changeInAllocatedSize)
virtual bool handlesPendingWrites () const
virtual void informPendingWriteSize (uint64, bool const)
virtual uint64 estimatePendingWriteDiskSize (uint64 rawFileSize) const
virtual void informStorageAreaCopy (uint64)
virtual bool supportsExtendSize () const
virtual bool canExtendSize () const
virtual void resetCanAttemptExtendSize ()
virtual::Core::Result getExtendSizeThreshold (uint64 &outExtendSizeThreshold) const
virtual void attemptExtendSize (int64 const &currentFreeSpace, ::std::function< void()> onCompleteCallback)
virtual void preemptiveExtendSize (uint64 const expectedContentSize, ::std::function< void()> successCallback, ::std::function< void()> failureCallback)
virtual uint64 getAvailableUserStorageSize ()
virtual void unloadFlatFileManifests (bool shouldClearManifests)
virtual void tick ()
virtual void flushImmediately (::Core::PathView flushPath)
virtual void enableFlushToDisk (bool)
virtual void enableSequentialWrites (bool)
virtual bool checkCorrupt (bool)
virtual ::Bedrock::NonOwnerPointer<::Core::FileIndexLru > getFileIndexLru ()
virtual::Core::FileStorageArea::FlushableLevelDbEnvType getFlushableLevelDbEnvType () const
virtual uint64 getTransactionWriteSizeLimit () const
virtual::Core::Result setSaveDataIcon (::Core::PathView)
virtual bool shouldAllowCommit () const
virtual void trackBytesWritten (::Core::PathView targetPath, uint64 amount, ::Core::WriteOperation writeOperation)
virtual void trackWriteOperation (::Core::PathView targetPath, ::Core::WriteOperation writeOperation)
virtual::Core::FileStorageArea::StorageAreaSpaceInfo getStorageAreaSpaceInfo ()
virtual bool shouldRecordFileError (::Core::PathView path, ::std::error_code error) const
virtual::Core::Result _commit ()
virtual::Core::Result _onTransactionsEmpty (bool)
virtual void _onTeardown ()
MCAPI FileStorageArea (::Core::FileAccessType type, ::Core::PathView rootPath, bool usesFlatFiles, bool isAccessedDirectly, ::std::shared_ptr<::Core::FileStorageArea > parent)
MCAPI void _addReadOperation (bool succeeded, uint64 numBytesRead)
MCAPI void _addWriteOperation (bool succeeded, uint64 numBytesWritten)
MCAPI void _beginTransaction (::Core::FileSystemImpl *pTransaction, bool)
MCAPI::Core::Result _endTransaction (::Core::FileSystemImpl *pTransaction, bool fromChild)
MCAPI void checkUserStorage ()
MCAPI void * $ctor (::Core::FileAccessType type, ::Core::PathView rootPath, bool usesFlatFiles, bool isAccessedDirectly, ::std::shared_ptr<::Core::FileStorageArea > parent)
MCAPI void $dtor ()
MCAPI ::std::unique_ptr<::Core::FileSystemImpl > $createTransaction (::Core::FileAccessType fileAccessType, ::Core::TransactionFlags)
MCAPI void $setUsedSizeOverride (uint64 fileSize)
MCAPI void $clearUsedSizeOverride ()
MCAPI void $notifyChangeInFileSize (int64 changeInSize, int64 changeInAllocatedSize)
MCAPI bool $handlesPendingWrites () const
MCAPI void $informPendingWriteSize (uint64, bool const)
MCAPI uint64 $estimatePendingWriteDiskSize (uint64 rawFileSize) const
MCAPI void $informStorageAreaCopy (uint64)
MCAPI bool $supportsExtendSize () const
MCAPI bool $canExtendSize () const
MCAPI void $resetCanAttemptExtendSize ()
MCAPI::Core::Result $getExtendSizeThreshold (uint64 &outExtendSizeThreshold) const
MCAPI void $attemptExtendSize (int64 const &currentFreeSpace, ::std::function< void()> onCompleteCallback)
MCAPI void $preemptiveExtendSize (uint64 const expectedContentSize, ::std::function< void()> successCallback, ::std::function< void()> failureCallback)
MCAPI uint64 $getAvailableUserStorageSize ()
MCAPI void $unloadFlatFileManifests (bool shouldClearManifests)
MCAPI void $tick ()
MCAPI void $flushImmediately (::Core::PathView flushPath)
MCAPI void $enableFlushToDisk (bool)
MCAPI void $enableSequentialWrites (bool)
MCAPI bool $checkCorrupt (bool)
MCAPI ::Bedrock::NonOwnerPointer<::Core::FileIndexLru > $getFileIndexLru ()
MCAPI::Core::FileStorageArea::FlushableLevelDbEnvType $getFlushableLevelDbEnvType () const
MCAPI uint64 $getTransactionWriteSizeLimit () const
MCAPI::Core::Result $setSaveDataIcon (::Core::PathView)
MCAPI bool $shouldAllowCommit () const
MCAPI void $trackBytesWritten (::Core::PathView targetPath, uint64 amount, ::Core::WriteOperation writeOperation)
MCAPI void $trackWriteOperation (::Core::PathView targetPath, ::Core::WriteOperation writeOperation)
MCAPI::Core::FileStorageArea::StorageAreaSpaceInfo $getStorageAreaSpaceInfo ()
MCAPI bool $shouldRecordFileError (::Core::PathView path, ::std::error_code error) const
MCAPI::Core::Result $_commit ()
MCAPI::Core::Result $_onTransactionsEmpty (bool)
MCAPI void $_onTeardown ()

Static Public Member Functions

static MCAPI ::Core::Result _getStorageAreaForPathImpl (::std::shared_ptr<::Core::FileStorageArea > &fileStorageArea, ::Core::PathView path)
static MCAPI ::Bedrock::Threading::BasicLockbox<::std::vector<::Core::FileStats * >, ::std::mutex > & sStorageAreaFileStats ()
static MCAPI ::Core::StorageAreasTree & sStorageAreas ()

Public Attributes

::ll::TypedStorage< 8, 80, ::std::recursive_mutex > mLock
::ll::TypedStorage< 8, 24, ::std::vector<::Core::FileSystemImpl * > > mAllTransactions
::ll::TypedStorage< 1, 1, bool > mCanAttemptExtendSave
::ll::TypedStorage< 1, 1, bool > mCachedFileUsageSize
::ll::TypedStorage< 8, 64, ::Core::FileStats > mTransactionStats
::ll::TypedStorage< 8, 64, ::Core::FileStats > mTotalStats
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::Core::FileStorageArea > > mParent
::ll::TypedStorage< 4, 4, ::Core::FileAccessType > mAccessType
::ll::TypedStorage< 8, 32, ::Core::PathBuffer<::std::string > > mRootPath
::ll::TypedStorage< 8, 24, ::std::vector<::Core::FileSystemImpl * > > mWriteTransactions
::ll::TypedStorage< 8, 32, ::Core::Subject<::Core::FileStorageAreaObserver, ::Core::SingleThreadedLock > > mSubject
::ll::TypedStorage< 8, 144, ::Core::StorageAreaState > mState
::ll::TypedStorage< 1, 1, ::std::atomic< bool > > mFileIOSuspended
::ll::TypedStorage< 8, 88, ::std::condition_variable_any > mResumeSignal
::ll::TypedStorage< 1, 1, bool > mLoggingEnabled
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::Core::FlatFileManifestTracker > > mManifestTracker
::ll::TypedStorage< 1, 1, bool > mIsAccessedDirectly

Constructor & Destructor Documentation

◆ FileStorageArea()

MCAPI Core::FileStorageArea::FileStorageArea ( ::Core::FileAccessType type,
::Core::PathView rootPath,
bool usesFlatFiles,
bool isAccessedDirectly,
::std::shared_ptr<::Core::FileStorageArea > parent )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

Member Function Documentation

◆ _addReadOperation()

MCAPI void Core::FileStorageArea::_addReadOperation ( bool succeeded,
uint64 numBytesRead )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _addWriteOperation()

MCAPI void Core::FileStorageArea::_addWriteOperation ( bool succeeded,
uint64 numBytesWritten )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _beginTransaction()

MCAPI void Core::FileStorageArea::_beginTransaction ( ::Core::FileSystemImpl * pTransaction,
bool  )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _endTransaction()

MCAPI::Core::Result Core::FileStorageArea::_endTransaction ( ::Core::FileSystemImpl * pTransaction,
bool fromChild )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ checkUserStorage()

MCAPI void Core::FileStorageArea::checkUserStorage ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ _getStorageAreaForPathImpl()

MCAPI ::Core::Result Core::FileStorageArea::_getStorageAreaForPathImpl ( ::std::shared_ptr<::Core::FileStorageArea > & fileStorageArea,
::Core::PathView path )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ sStorageAreaFileStats()

MCAPI ::Bedrock::Threading::BasicLockbox<::std::vector<::Core::FileStats * >, ::std::mutex > & Core::FileStorageArea::sStorageAreaFileStats ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ sStorageAreas()

MCAPI ::Core::StorageAreasTree & Core::FileStorageArea::sStorageAreas ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor()

MCAPI void * Core::FileStorageArea::$ctor ( ::Core::FileAccessType type,
::Core::PathView rootPath,
bool usesFlatFiles,
bool isAccessedDirectly,
::std::shared_ptr<::Core::FileStorageArea > parent )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $dtor()

MCAPI void Core::FileStorageArea::$dtor ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $createTransaction()

MCAPI ::std::unique_ptr<::Core::FileSystemImpl > Core::FileStorageArea::$createTransaction ( ::Core::FileAccessType fileAccessType,
::Core::TransactionFlags  )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $setUsedSizeOverride()

MCAPI void Core::FileStorageArea::$setUsedSizeOverride ( uint64 fileSize)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $clearUsedSizeOverride()

MCAPI void Core::FileStorageArea::$clearUsedSizeOverride ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $notifyChangeInFileSize()

MCAPI void Core::FileStorageArea::$notifyChangeInFileSize ( int64 changeInSize,
int64 changeInAllocatedSize )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $handlesPendingWrites()

MCAPI bool Core::FileStorageArea::$handlesPendingWrites ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $informPendingWriteSize()

MCAPI void Core::FileStorageArea::$informPendingWriteSize ( uint64 ,
bool const  )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $estimatePendingWriteDiskSize()

MCAPI uint64 Core::FileStorageArea::$estimatePendingWriteDiskSize ( uint64 rawFileSize) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $informStorageAreaCopy()

MCAPI void Core::FileStorageArea::$informStorageAreaCopy ( uint64 )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $supportsExtendSize()

MCAPI bool Core::FileStorageArea::$supportsExtendSize ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $canExtendSize()

MCAPI bool Core::FileStorageArea::$canExtendSize ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $resetCanAttemptExtendSize()

MCAPI void Core::FileStorageArea::$resetCanAttemptExtendSize ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getExtendSizeThreshold()

MCAPI::Core::Result Core::FileStorageArea::$getExtendSizeThreshold ( uint64 & outExtendSizeThreshold) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $attemptExtendSize()

MCAPI void Core::FileStorageArea::$attemptExtendSize ( int64 const & currentFreeSpace,
::std::function< void()> onCompleteCallback )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $preemptiveExtendSize()

MCAPI void Core::FileStorageArea::$preemptiveExtendSize ( uint64 const expectedContentSize,
::std::function< void()> successCallback,
::std::function< void()> failureCallback )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getAvailableUserStorageSize()

MCAPI uint64 Core::FileStorageArea::$getAvailableUserStorageSize ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $unloadFlatFileManifests()

MCAPI void Core::FileStorageArea::$unloadFlatFileManifests ( bool shouldClearManifests)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $tick()

MCAPI void Core::FileStorageArea::$tick ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $flushImmediately()

MCAPI void Core::FileStorageArea::$flushImmediately ( ::Core::PathView flushPath)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $enableFlushToDisk()

MCAPI void Core::FileStorageArea::$enableFlushToDisk ( bool )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $enableSequentialWrites()

MCAPI void Core::FileStorageArea::$enableSequentialWrites ( bool )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $checkCorrupt()

MCAPI bool Core::FileStorageArea::$checkCorrupt ( bool )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getFileIndexLru()

MCAPI ::Bedrock::NonOwnerPointer<::Core::FileIndexLru > Core::FileStorageArea::$getFileIndexLru ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getFlushableLevelDbEnvType()

MCAPI::Core::FileStorageArea::FlushableLevelDbEnvType Core::FileStorageArea::$getFlushableLevelDbEnvType ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getTransactionWriteSizeLimit()

MCAPI uint64 Core::FileStorageArea::$getTransactionWriteSizeLimit ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $setSaveDataIcon()

MCAPI::Core::Result Core::FileStorageArea::$setSaveDataIcon ( ::Core::PathView )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $shouldAllowCommit()

MCAPI bool Core::FileStorageArea::$shouldAllowCommit ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $trackBytesWritten()

MCAPI void Core::FileStorageArea::$trackBytesWritten ( ::Core::PathView targetPath,
uint64 amount,
::Core::WriteOperation writeOperation )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $trackWriteOperation()

MCAPI void Core::FileStorageArea::$trackWriteOperation ( ::Core::PathView targetPath,
::Core::WriteOperation writeOperation )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getStorageAreaSpaceInfo()

MCAPI::Core::FileStorageArea::StorageAreaSpaceInfo Core::FileStorageArea::$getStorageAreaSpaceInfo ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $shouldRecordFileError()

MCAPI bool Core::FileStorageArea::$shouldRecordFileError ( ::Core::PathView path,
::std::error_code error ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $_commit()

MCAPI::Core::Result Core::FileStorageArea::$_commit ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $_onTransactionsEmpty()

MCAPI::Core::Result Core::FileStorageArea::$_onTransactionsEmpty ( bool )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $_onTeardown()

MCAPI void Core::FileStorageArea::$_onTeardown ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: