All methods may be safely called from multiple threads simultaneously, unless otherwise noted 更多...
#include <FileCache.h>
Public 成员函数 | |
| virtual IMemoryReadStreamRef | ReadData (FGraphEventArray &OutCompletionEvents, int64 Offset, int64 BytesToRead, EAsyncIOPriorityAndFlags Priority)=0 |
| Read a byte range form the file. 更多... | |
| virtual void | WaitAll ()=0 |
| Wait until all outstanding read requests complete. | |
静态 Public 成员函数 | |
| static CORE_API IFileCacheHandle * | CreateFileCacheHandle (const TCHAR *InFileName) |
| Create a IFileCacheHandle from a filename. 更多... | |
| static CORE_API IFileCacheHandle * | CreateFileCacheHandle (IAsyncReadFileHandle *FileHandle) |
| Create a IFileCacheHandle from a IAsyncReadFileHandle. 更多... | |
| static CORE_API uint32 | GetFileCacheSize () |
| Return size of underlying file cache in bytes. | |
All methods may be safely called from multiple threads simultaneously, unless otherwise noted
Also note, if you create several IFileCacheHandle's to the same file on separate threads these will be considered as individual separate files from the cache point of view and thus each will have their own cache data allocated.
|
static |
Create a IFileCacheHandle from a filename.
| InFileName | A path to a file. |
|
static |
Create a IFileCacheHandle from a IAsyncReadFileHandle.
| FileHandle | A valid IAsyncReadFileHandle that has already been created elsewhere. |
|
pure virtual |
Read a byte range form the file.
This can be a high-throughput operation and done lots of times for small reads. The system will handle this efficiently.
| OutCompletionEvents | Must wait until these events are complete before returned data is valid |