engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FRuntimeAssetCacheInterface类 参考abstract

Interface for the Runtime Asset Cache. 更多...

#include <RuntimeAssetCacheInterface.h>

Public 成员函数

virtual void AddToAsyncCompletionCounter (int32 Addend)=0
 Adds a number from the thread safe counter which tracks outstanding async requests. 更多...
 
virtual bool ClearCache ()=0
 Removes all cache entries. 更多...
 
virtual bool ClearCache (FName Bucket)=0
 Removes all cache from given bucket. 更多...
 
virtual int32 GetAsynchronous (IRuntimeAssetCacheBuilder *CacheBuilder)=0
 Asynchronously checks the cache. 更多...
 
virtual int32 GetAsynchronous (IRuntimeAssetCacheBuilder *CacheBuilder, const FOnRuntimeAssetCacheAsyncComplete &OnCompletionDelegate)=0
 Asynchronously checks the cache. 更多...
 
virtual FVoidPtrParam GetAsynchronousResults (int32 Handle)=0
 Gets asynchronous query results. 更多...
 
virtual int32 GetCacheSize (FName Bucket) const =0
 Gets cache size. 更多...
 
virtual FVoidPtrParam GetSynchronous (IRuntimeAssetCacheBuilder *CacheBuilder)=0
 Synchronously gets value from cache. 更多...
 
virtual bool PollAsynchronousCompletion (int32 Handle)=0
 Checks if worker finished execution. 更多...
 
virtual void Tick ()=0
 Ticks async thread.
 
virtual void WaitAsynchronousCompletion (int32 Handle)=0
 Waits until worker finishes execution. 更多...
 

详细描述

Interface for the Runtime Asset Cache.

Cache is split into buckets to cache various assets separately. Bucket names and maximum sizes are configure via Engine.ini config file using the following syntax [RuntimeAssetCache] +BucketConfigs=(Name="<Plugin name>", Size=<Maximum bucket size in bytes>) This API is fully thread safe.

成员函数说明

◆ AddToAsyncCompletionCounter()

virtual void FRuntimeAssetCacheInterface::AddToAsyncCompletionCounter ( int32  Addend)
pure virtual

Adds a number from the thread safe counter which tracks outstanding async requests.

This is used to ensure everything is complete prior to shutdown.

参数
Valueto add to counter. Can be negative.

◆ ClearCache() [1/2]

virtual bool FRuntimeAssetCacheInterface::ClearCache ( )
pure virtual

Removes all cache entries.

返回
true if cache was successfully cleaned.

◆ ClearCache() [2/2]

virtual bool FRuntimeAssetCacheInterface::ClearCache ( FName  Bucket)
pure virtual

Removes all cache from given bucket.

参数
BucketBucket to clean.
返回
true if cache was successfully cleaned.

◆ GetAsynchronous() [1/2]

virtual int32 FRuntimeAssetCacheInterface::GetAsynchronous ( IRuntimeAssetCacheBuilder *  CacheBuilder)
pure virtual

Asynchronously checks the cache.

If value is not found, builds entry using CacheBuilder and updates cache.

参数
CacheBuilderBuilder to produce cache key and in the event of a miss, return the data.
返回
Handle to worker.

◆ GetAsynchronous() [2/2]

virtual int32 FRuntimeAssetCacheInterface::GetAsynchronous ( IRuntimeAssetCacheBuilder *  CacheBuilder,
const FOnRuntimeAssetCacheAsyncComplete &  OnCompletionDelegate 
)
pure virtual

Asynchronously checks the cache.

If value is not found, builds entry using CacheBuilder and updates cache.

参数
CacheBuilderBuilder to produce cache key and in the event of a miss, return the data.
OnCompletionDelegateDelegate to call when cache is ready. Delegate is called on main thread.
返回
Handle to worker.

◆ GetAsynchronousResults()

virtual FVoidPtrParam FRuntimeAssetCacheInterface::GetAsynchronousResults ( int32  Handle)
pure virtual

Gets asynchronous query results.

参数
HandleWorker handle to check.
返回
Pointer to retrieved cache entry, nullptr on fail. Fail occurs only when
  • there's no entry in cache and CacheBuilder is nullptr or
  • CacheBuilder returned nullptr

◆ GetCacheSize()

virtual int32 FRuntimeAssetCacheInterface::GetCacheSize ( FName  Bucket) const
pure virtual

Gets cache size.

参数
Bucketto check.
返回
Maximum allowed bucket size.

◆ GetSynchronous()

virtual FVoidPtrParam FRuntimeAssetCacheInterface::GetSynchronous ( IRuntimeAssetCacheBuilder *  CacheBuilder)
pure virtual

Synchronously gets value from cache.

If value is not found, builds entry using CacheBuilder and updates cache.

参数
CacheBuilderBuilder to produce cache key and in the event of a miss.
返回
Pointer to retrieved cache entry, nullptr on fail. Fail occurs only when
  • there's no entry in cache and CacheBuilder is nullptr or
  • CacheBuilder returned nullptr

◆ PollAsynchronousCompletion()

virtual bool FRuntimeAssetCacheInterface::PollAsynchronousCompletion ( int32  Handle)
pure virtual

Checks if worker finished execution.

参数
HandleWorker handle to check.
返回
True if execution finished, false otherwise.

◆ WaitAsynchronousCompletion()

virtual void FRuntimeAssetCacheInterface::WaitAsynchronousCompletion ( int32  Handle)
pure virtual

Waits until worker finishes execution.

参数
HandleWorker handle to wait for.

该类的文档由以下文件生成: