Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ClientBlobCache::Cache Class Reference
Inheritance diagram for ClientBlobCache::Cache:

Public Types

using Timestamp = uint64

Public Member Functions

virtual void onLowMemory (::LowMemorySeverity)
virtual void onAppSuspended ()
MCAPI void _flushTimestampsToDisk (::Bedrock::Threading::UniqueLock<::std::mutex > lock)
MCAPI void _updateTimestamp (uint64 id)
MCAPI bool doesBlobExist (uint64 id) const
MCAPI bool get (uint64 id, ::std::string &buffer)
MCAPI bool hasClientRecentlyRequestedBlobId (uint64 id)
MCAPI bool hasClientRequestedBlobId (uint64 id)
MCAPI void insert (::std::unordered_map< uint64, ::std::string > const &blobs)
MCAPI void pruneRecentlyReceivedBlobIds (::std::chrono::steady_clock::time_point currentTime)
MCAPI void recordReceivedBlobId (uint64 id)
MCAPI void recordRequestedBlobId (uint64 id)
MCAPI void $onLowMemory (::LowMemorySeverity)
MCAPI void $onAppSuspended ()
virtual void onAppPaused ()
virtual void onAppUnpaused ()
virtual void onAppPreSuspended ()
virtual void onAppResumed ()
virtual void onAppFocusLost ()
virtual void onAppFocusGained ()
virtual void onAppTerminated ()
virtual void onOperationModeChanged (::OperationMode const operationMode)
virtual void onPerformanceModeChanged (bool const boost)
virtual void onPushNotificationReceived (::PushNotificationMessage const &msg)
virtual void onRefreshRateChanged (::RefreshRate const refreshRate)
virtual void onResizeBegin ()
virtual void onResizeEnd ()
virtual void onDeviceLost ()
virtual void onAppSurfaceCreated ()
virtual void onAppSurfaceDestroyed ()
virtual void onClipboardCopy (::std::string const &clipString)
virtual void onClipboardPaste (::std::string const &clipString)
MCAPI void initListener (float priority)
MCAPI void $dtor ()
MCAPI void $onAppPaused ()
MCAPI void $onAppUnpaused ()
MCAPI void $onAppPreSuspended ()
MCAPI void $onAppResumed ()
MCAPI void $onAppFocusLost ()
MCAPI void $onAppFocusGained ()
MCAPI void $onAppTerminated ()
MCAPI void $onOperationModeChanged (::OperationMode const operationMode)
MCAPI void $onPerformanceModeChanged (bool const boost)
MCAPI void $onPushNotificationReceived (::PushNotificationMessage const &msg)
MCAPI void $onRefreshRateChanged (::RefreshRate const refreshRate)
MCAPI void $onResizeBegin ()
MCAPI void $onResizeEnd ()
MCAPI void $onDeviceLost ()
MCAPI void $onAppSurfaceCreated ()
MCAPI void $onAppSurfaceDestroyed ()
MCAPI void $onClipboardCopy (::std::string const &clipString)
MCAPI void $onClipboardPaste (::std::string const &clipString)

Static Public Member Functions

static MCAPI ::std::shared_ptr<::DBStorage > _openDB (::Core::Path path, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv)
static MCAPI void _writeTimestampsToDisk (::LevelStorage &db, ::std::unordered_map< uint64, uint64 > const &timestamps)
static MCAPI ::Core::PathBuffer<::std::string > getPath ()
static MCAPI ::std::shared_ptr<::ClientBlobCache::Cache > tryCreate (::WorkerPool &workers, ::Scheduler &context, ::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv)
static MCAPI void ** $vftable ()

Public Attributes

::ll::TypedStorage< 8, 16, ::std::shared_ptr<::DBStorage > > mDB
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::TaskGroup > > mTaskGroup
::ll::TypedStorage< 8, 80, ::std::mutex > mTimestampMutex
::ll::TypedStorage< 8, 64, ::std::unordered_map< uint64, uint64 > > mTimestamps
::ll::TypedStorage< 8, 8, uint64 > mBaseTimestamp
::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mCacheLoadingTime
::ll::TypedStorage< 8, 80, ::std::mutex > mValidatorMutex
::ll::TypedStorage< 8, 64, ::std::unordered_set< uint64 > > mRequestedBlobIds
::ll::TypedStorage< 8, 64, ::std::unordered_map< uint64, ::std::chrono::steady_clock::time_point > > mRecentlyReceivedBlobIds
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::Subscription > mLowMemorySubscription
::ll::TypedStorage< 1, 1, bool > mListenerRegistered

Member Function Documentation

◆ onLowMemory()

virtual void ClientBlobCache::Cache::onLowMemory ( ::LowMemorySeverity )
virtual

Reimplemented from AppPlatformListener.

◆ onAppSuspended()

virtual void ClientBlobCache::Cache::onAppSuspended ( )
virtual

Reimplemented from AppPlatformListener.

◆ _flushTimestampsToDisk()

MCAPI void ClientBlobCache::Cache::_flushTimestampsToDisk ( ::Bedrock::Threading::UniqueLock<::std::mutex > lock)
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.

◆ _updateTimestamp()

MCAPI void ClientBlobCache::Cache::_updateTimestamp ( uint64 id)
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.

◆ get()

MCAPI bool ClientBlobCache::Cache::get ( uint64 id,
::std::string & buffer )
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.

◆ hasClientRecentlyRequestedBlobId()

MCAPI bool ClientBlobCache::Cache::hasClientRecentlyRequestedBlobId ( uint64 id)
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.

◆ hasClientRequestedBlobId()

MCAPI bool ClientBlobCache::Cache::hasClientRequestedBlobId ( uint64 id)
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.

◆ insert()

MCAPI void ClientBlobCache::Cache::insert ( ::std::unordered_map< uint64, ::std::string > const & blobs)
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.

◆ pruneRecentlyReceivedBlobIds()

MCAPI void ClientBlobCache::Cache::pruneRecentlyReceivedBlobIds ( ::std::chrono::steady_clock::time_point currentTime)
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.

◆ recordReceivedBlobId()

MCAPI void ClientBlobCache::Cache::recordReceivedBlobId ( uint64 id)
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.

◆ recordRequestedBlobId()

MCAPI void ClientBlobCache::Cache::recordRequestedBlobId ( uint64 id)
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.

◆ _openDB()

MCAPI ::std::shared_ptr<::DBStorage > ClientBlobCache::Cache::_openDB ( ::Core::Path path,
::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv )
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.

◆ _writeTimestampsToDisk()

MCAPI void ClientBlobCache::Cache::_writeTimestampsToDisk ( ::LevelStorage & db,
::std::unordered_map< uint64, uint64 > const & timestamps )
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.

◆ getPath()

MCAPI ::Core::PathBuffer<::std::string > ClientBlobCache::Cache::getPath ( )
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.

◆ tryCreate()

MCAPI ::std::shared_ptr<::ClientBlobCache::Cache > ClientBlobCache::Cache::tryCreate ( ::WorkerPool & workers,
::Scheduler & context,
::Bedrock::NotNullNonOwnerPtr<::LevelDbEnv > levelDbEnv )
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.

◆ $onLowMemory()

MCAPI void ClientBlobCache::Cache::$onLowMemory ( ::LowMemorySeverity )
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.

◆ $onAppSuspended()

MCAPI void ClientBlobCache::Cache::$onAppSuspended ( )
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.

◆ initListener()

MCAPI void AppPlatformListener::initListener ( float priority)
inherited
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 AppPlatformListener::$dtor ( )
inherited
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.

◆ $onAppPaused()

MCAPI void AppPlatformListener::$onAppPaused ( )
inherited
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.

◆ $onAppUnpaused()

MCAPI void AppPlatformListener::$onAppUnpaused ( )
inherited
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.

◆ $onAppPreSuspended()

MCAPI void AppPlatformListener::$onAppPreSuspended ( )
inherited
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.

◆ $onAppResumed()

MCAPI void AppPlatformListener::$onAppResumed ( )
inherited
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.

◆ $onAppFocusLost()

MCAPI void AppPlatformListener::$onAppFocusLost ( )
inherited
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.

◆ $onAppFocusGained()

MCAPI void AppPlatformListener::$onAppFocusGained ( )
inherited
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.

◆ $onAppTerminated()

MCAPI void AppPlatformListener::$onAppTerminated ( )
inherited
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.

◆ $onOperationModeChanged()

MCAPI void AppPlatformListener::$onOperationModeChanged ( ::OperationMode const operationMode)
inherited
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.

◆ $onPerformanceModeChanged()

MCAPI void AppPlatformListener::$onPerformanceModeChanged ( bool const boost)
inherited
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.

◆ $onPushNotificationReceived()

MCAPI void AppPlatformListener::$onPushNotificationReceived ( ::PushNotificationMessage const & msg)
inherited
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.

◆ $onRefreshRateChanged()

MCAPI void AppPlatformListener::$onRefreshRateChanged ( ::RefreshRate const refreshRate)
inherited
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.

◆ $onResizeBegin()

MCAPI void AppPlatformListener::$onResizeBegin ( )
inherited
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.

◆ $onResizeEnd()

MCAPI void AppPlatformListener::$onResizeEnd ( )
inherited
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.

◆ $onDeviceLost()

MCAPI void AppPlatformListener::$onDeviceLost ( )
inherited
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.

◆ $onAppSurfaceCreated()

MCAPI void AppPlatformListener::$onAppSurfaceCreated ( )
inherited
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.

◆ $onAppSurfaceDestroyed()

MCAPI void AppPlatformListener::$onAppSurfaceDestroyed ( )
inherited
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.

◆ $onClipboardCopy()

MCAPI void AppPlatformListener::$onClipboardCopy ( ::std::string const & clipString)
inherited
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.

◆ $onClipboardPaste()

MCAPI void AppPlatformListener::$onClipboardPaste ( ::std::string const & clipString)
inherited
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.

◆ $vftable()

MCAPI void ** AppPlatformListener::$vftable ( )
staticinherited
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 files:
  • src-server/mc/client/network/blob_cache/client_blob_cache/Cache.h
  • src-client/mc/client/network/blob_cache/client_blob_cache/Cache.h