UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchServices::IChunkStore Class Referenceabstract

#include <ChunkStore.h>

+ Inheritance diagram for BuildPatchServices::IChunkStore:

Public Member Functions

virtual ~IChunkStore ()
 
virtual void Put (const FGuid &DataId, TUniquePtr< IChunkDataAccess > ChunkData)=0
 
virtual IChunkDataAccessGet (const FGuid &DataId)=0
 
virtual TUniquePtr< IChunkDataAccessRemove (const FGuid &DataId)=0
 
virtual int32 GetSize () const =0
 
virtual void SetLostChunkCallback (TFunction< void(const FGuid &)> Callback)=0
 

Detailed Description

An interface providing access to storage of chunk data instances.

Constructor & Destructor Documentation

◆ ~IChunkStore()

virtual BuildPatchServices::IChunkStore::~IChunkStore ( )
inlinevirtual

Member Function Documentation

◆ Get()

virtual IChunkDataAccess * BuildPatchServices::IChunkStore::Get ( const FGuid DataId)
pure virtual

Get access to chunk data contained in this store. The returned data ptr is only valid until the next Get call, or a remove call for the same data.

Parameters
DataIdThe GUID for the data.
Returns
ptr to the data instance, or nullptr if this GUID was not in the store.

Implemented in BuildPatchServices::FMemoryChunkStore.

◆ GetSize()

virtual int32 BuildPatchServices::IChunkStore::GetSize ( ) const
pure virtual

Get the number of chunks this store can hold. For unsized stores, it is expected to return max int32 value.

Returns
the store size.

Implemented in BuildPatchServices::FMemoryChunkStore.

◆ Put()

virtual void BuildPatchServices::IChunkStore::Put ( const FGuid DataId,
TUniquePtr< IChunkDataAccess ChunkData 
)
pure virtual

Put chunk data into this store. Chunk data unique ptr must be moved in, the store becomes the owner of the memory and its lifetime. Whether or not the call involves actually storing the data provided is implementation specific. It is possible to implement readonly/null IChunkStore.

Parameters
DataIdThe GUID for the data.
ChunkDataThe instance of the data. This must be moved in.

Implemented in BuildPatchServices::FMemoryChunkStore.

◆ Remove()

virtual TUniquePtr< IChunkDataAccess > BuildPatchServices::IChunkStore::Remove ( const FGuid DataId)
pure virtual

Remove chunk data from this store. The data access is returned, this will cause destruction once out of scope. Whether or not the call involves actual data destruction is implementation specific. It is possible to implement readonly/null IChunkStore.

Parameters
DataIdThe GUID for the data.
Returns
the data instance referred to, or invalid if this GUID was not in the store.

Implemented in BuildPatchServices::FMemoryChunkStore.

◆ SetLostChunkCallback()

virtual void BuildPatchServices::IChunkStore::SetLostChunkCallback ( TFunction< void(const FGuid &)>  Callback)
pure virtual

Sets a callback to be used when chunks which have been Put, are lost. Examples of why this may occur: An eviction policy instructs the store to boot a chunk, but this store has no overflow store provided. (see IChunkEvictionPolicy::Query). The system backing this store (e.g. a file on disk storage) experiences a failure and the chunk could not be held. NB: The callback is not executed for a standard Clean instruction from an eviction policy.

Parameters
CallbackThe function to call with the chunk that is no longer available.

Implemented in BuildPatchServices::FMemoryChunkStore.


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