Inherits AZ::IO::StreamStackEntry.
|
void | ReadFile (FileRequest *request, Requests::ReadData &data) |
|
void | ContinueReadFile (FileRequest *request, u64 fileLength) |
|
CacheResult | ReadFromCache (FileRequest *request, Section §ion, const RequestPath &filePath) |
|
CacheResult | ReadFromCache (FileRequest *request, Section §ion, u32 cacheBlock) |
|
CacheResult | ServiceFromCache (FileRequest *request, Section §ion, const RequestPath &filePath, bool sharedRead) |
|
void | CompleteRead (FileRequest &request) |
|
bool | SplitRequest (Section &prolog, Section &main, Section &epilog, const RequestPath &filePath, u64 fileLength, u64 offset, u64 size, u8 *buffer) const |
|
u8 * | GetCacheBlockData (u32 index) |
|
void | TouchBlock (u32 index) |
|
AZ::u32 | RecycleOldestBlock (const RequestPath &filePath, u64 offset) |
|
u32 | FindInCache (const RequestPath &filePath, u64 offset) const |
|
bool | IsCacheBlockInFlight (u32 index) const |
|
void | ResetCacheEntry (u32 index) |
|
void | ResetCache () |
|
void | Report (const Requests::ReportData &data) const |
|
|
AZStd::unordered_multimap< FileRequest *, Section > | m_pendingRequests |
| Map of the file requests that are being processed and the sections of the parent requests they'll complete.
|
|
AZStd::deque< Section > | m_delayedSections |
| List of file sections that were delayed because the cache was full.
|
|
AZ::Statistics::RunningStatistic | m_hitRateStat |
|
AZ::Statistics::RunningStatistic | m_cacheableStat |
|
u8 * | m_cache |
|
u64 | m_cacheSize |
|
u32 | m_blockSize |
|
u32 | m_alignment |
|
u32 | m_numBlocks |
|
s32 | m_numInFlightRequests { 0 } |
|
AZStd::unique_ptr< RequestPath[]> | m_cachedPaths |
| The file path associated with a cache block.
|
|
AZStd::unique_ptr< u64[]> | m_cachedOffsets |
| The offset into the file the cache blocks starts at.
|
|
AZStd::unique_ptr< TimePoint[]> | m_blockLastTouched |
| The last time the cache block was read from.
|
|
AZStd::unique_ptr< FileRequest *[]> | m_inFlightRequests |
| The file request that's currently read data into the cache block. If null, the block has been read.
|
|
s32 | m_numMetaDataRetrievalInProgress { 0 } |
| The number of requests waiting for meta data to be retrieved.
|
|
bool | m_onlyEpilogWrites |
| Whether or not only the epilog ever writes to the cache.
|
|
AZStd::string | m_name |
| The name that uniquely identifies this entry.
|
|
AZStd::shared_ptr< StreamStackEntry > | m_next |
| The next entry in the stack.
|
|
StreamerContext * | m_context |
| Context information for the entire streaming stack.
|
|
|
static constexpr u32 | s_fileNotCached = static_cast<u32>(-1) |
|
◆ CacheResult
Enumerator |
---|
ReadFromCache | Data was found in the cache and reused.
|
CacheMiss | Data wasn't found in the cache and no sub request was queued.
|
Queued | A sub request was created or appended and queued for processing on the next entry in the streamer stack.
|
Delayed | There's no more room to queue a new request, so delay the request until a slot becomes available.
|
◆ CollectStatistics()
Collect various statistics on this stack entry. These are for profiling and debugging purposes only.
Reimplemented from AZ::IO::StreamStackEntry.
◆ ExecuteRequests()
bool AZ::IO::BlockCache::ExecuteRequests |
( |
| ) |
|
|
overridevirtual |
Executes one or more queued requests. This is needed for synchronously executing requests, but asynchronous requests can already be running from the PrepareRequest call in which case this call is ignored.
- Returns
- True if a request was processed, otherwise false.
Reimplemented from AZ::IO::StreamStackEntry.
◆ QueueRequest()
void AZ::IO::BlockCache::QueueRequest |
( |
FileRequest * |
request | ) |
|
|
overridevirtual |
Queues a request to be executed at a later point when ExecuteRequests is called. This can include splitting up the request in more fine-grained steps.
Reimplemented from AZ::IO::StreamStackEntry.
◆ UpdateCompletionEstimates()
Updates the estimate of the time the requests will complete. This generally works by bubbling up the estimation and each stack entry adding it's additional overhead if any. When chaining this call, first call the next entry in the stack before adding the current entry's estimate.
- Parameters
-
now | The current time. This is captured once to avoid repeatedly querying the system clock. |
internalPending | The requests that are pending in the stream stack. These are always estimated as coming after the queued requests. Because this call will go from the top of the stack to the bottom, but estimation is calculated from the bottom to the top, this list should be processed in reverse order. |
pendingBegin | Iterator pointing to the start of the requests that are waiting for a processing slot in the stack. |
pendingEnd | Iterator pointing to the end of the requests that are waiting for a processing slot in the stack. |
Reimplemented from AZ::IO::StreamStackEntry.
◆ UpdateStatus()
void AZ::IO::BlockCache::UpdateStatus |
( |
Status & |
status | ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file:
- Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.h