UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchServices::FMemoryChunkStore Class Reference
+ Inheritance diagram for BuildPatchServices::FMemoryChunkStore:

Public Member Functions

 FMemoryChunkStore (int32 InStoreSize, IChunkEvictionPolicy *InEvictionPolicy, IChunkStore *InOverflowStore, IMemoryChunkStoreStat *InMemoryChunkStoreStat, IChunkReferenceTracker *InChunkReferenceTracker)
 
 ~FMemoryChunkStore ()
 
virtual void Put (const FGuid &DataId, TUniquePtr< IChunkDataAccess > ChunkData) override
 
virtual IChunkDataAccessGet (const FGuid &DataId) override
 
virtual TUniquePtr< IChunkDataAccessRemove (const FGuid &DataId) override
 
virtual int32 GetSize () const override
 
virtual void SetLostChunkCallback (TFunction< void(const FGuid &)> Callback) override
 
virtual void DumpToOverflow () override
 
- Public Member Functions inherited from BuildPatchServices::IMemoryChunkStore
virtual ~IMemoryChunkStore ()
 
- Public Member Functions inherited from BuildPatchServices::IChunkStore
virtual ~IChunkStore ()
 

Constructor & Destructor Documentation

◆ FMemoryChunkStore()

BuildPatchServices::FMemoryChunkStore::FMemoryChunkStore ( int32  InStoreSize,
IChunkEvictionPolicy InEvictionPolicy,
IChunkStore InOverflowStore,
IMemoryChunkStoreStat InMemoryChunkStoreStat,
IChunkReferenceTracker InChunkReferenceTracker 
)

◆ ~FMemoryChunkStore()

BuildPatchServices::FMemoryChunkStore::~FMemoryChunkStore ( )

Member Function Documentation

◆ DumpToOverflow()

void BuildPatchServices::FMemoryChunkStore::DumpToOverflow ( )
overridevirtual

Dumps all chunks contained in this store into the overflow provided at construction, removing all chunks from this store in the process. This function will also invalidate data ptr previously returned by Get().

Implements BuildPatchServices::IMemoryChunkStore.

◆ Get()

IChunkDataAccess * BuildPatchServices::FMemoryChunkStore::Get ( const FGuid DataId)
overridevirtual

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.

Implements BuildPatchServices::IChunkStore.

◆ GetSize()

int32 BuildPatchServices::FMemoryChunkStore::GetSize ( ) const
overridevirtual

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

Returns
the store size.

Implements BuildPatchServices::IChunkStore.

◆ Put()

void BuildPatchServices::FMemoryChunkStore::Put ( const FGuid DataId,
TUniquePtr< IChunkDataAccess ChunkData 
)
overridevirtual

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.

Implements BuildPatchServices::IChunkStore.

◆ Remove()

TUniquePtr< IChunkDataAccess > BuildPatchServices::FMemoryChunkStore::Remove ( const FGuid DataId)
overridevirtual

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.

Implements BuildPatchServices::IChunkStore.

◆ SetLostChunkCallback()

void BuildPatchServices::FMemoryChunkStore::SetLostChunkCallback ( TFunction< void(const FGuid &)>  Callback)
overridevirtual

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.

Implements BuildPatchServices::IChunkStore.


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