UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FChunkCacheWorker Class Reference

#include <SignedArchiveReader.h>

+ Inheritance diagram for FChunkCacheWorker:

Public Member Functions

 FChunkCacheWorker (TUniquePtr< FArchive > InReader, const TCHAR *Filename)
 
virtual ~FChunkCacheWorker ()
 
virtual bool Init ()
 
virtual uint32 Run ()
 
virtual void Stop ()
 
TSharedPtr< const FPakSignatureFile, ESPMode::ThreadSafeGetSignatures () const
 
FChunkRequestRequestChunk (int32 ChunkIndex, int64 StartOffset, int64 ChunkSize, FEvent *Event)
 
void ReleaseChunk (FChunkRequest &Chunk)
 
bool IsValid () const
 
- Public Member Functions inherited from FRunnable
virtual void Exit ()
 
virtual class FSingleThreadRunnableGetSingleThreadInterface ()
 
virtual ~FRunnable ()
 

Friends

class FSignedArchiveReader
 

Detailed Description

Thread that loads and verifies signed chunks. One per pak file but can serve multiple FSignedArchiveReaders from multiple threads! Can process multiple chunks using a limited number of buffers.

Constructor & Destructor Documentation

◆ FChunkCacheWorker()

FChunkCacheWorker::FChunkCacheWorker ( TUniquePtr< FArchive InReader,
const TCHAR Filename 
)

◆ ~FChunkCacheWorker()

FChunkCacheWorker::~FChunkCacheWorker ( )
virtual

Member Function Documentation

◆ GetSignatures()

TSharedPtr< const FPakSignatureFile, ESPMode::ThreadSafe > FChunkCacheWorker::GetSignatures ( ) const
inline

◆ Init()

bool FChunkCacheWorker::Init ( void  )
virtual

Initializes the runnable object.

This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.

Returns
True if initialization was successful, false otherwise
See also
Run, Stop, Exit

Reimplemented from FRunnable.

◆ IsValid()

bool FChunkCacheWorker::IsValid ( ) const

Indicates that this chunk worker is valid. If the signature file couldn't be loaded or if it failed the principal table check, this will be false

◆ ReleaseChunk()

void FChunkCacheWorker::ReleaseChunk ( FChunkRequest Chunk)

Releases the requested chunk buffer

◆ RequestChunk()

FChunkRequest & FChunkCacheWorker::RequestChunk ( int32  ChunkIndex,
int64  StartOffset,
int64  ChunkSize,
FEvent Event 
)

Requests a chunk to be loaded and verified

Parameters
ChunkIndexIndex of a chunk to load
StartOffsetOffset to the beginning of the chunk
ChunkSizeChunk size
EventOptional FEvent that will signal when the request is ready, nullptr is valid if the calling code does not want this signal
Returns
Handle to the request.

◆ Run()

uint32 FChunkCacheWorker::Run ( )
virtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

Returns
The exit code of the runnable object
See also
Init, Stop, Exit

Implements FRunnable.

◆ Stop()

void FChunkCacheWorker::Stop ( void  )
virtual

Stops the runnable object.

This is called if a thread is requested to terminate early.

See also
Init, Run, Exit

Reimplemented from FRunnable.

Friends And Related Symbol Documentation

◆ FSignedArchiveReader


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