You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Per.Larsson #rnx #preflight 61a8940b9c77d610079ce7da - Made all backends final, they should not be derived from. - Added header files for the remaining backends that were cpp only. The headers are in the modules private directory so will not be used elsewhere and it makes it easier to see the interface. #ROBOMERGE-AUTHOR: paul.chipchase #ROBOMERGE-SOURCE: CL 18350848 in //UE5/Release-5.0/... via CL 18350854 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18350856 by paul chipchase in ue5-release-engine-test branch]
58 lines
1.9 KiB
C++
58 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IVirtualizationBackend.h"
|
|
|
|
#include "DerivedDataCacheKey.h"
|
|
|
|
namespace UE::DerivedData { enum class ECachePolicy : uint32; }
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
/**
|
|
* A backend that uses the DDC2 as it's storage mechanism. It is intended to be used as a local caching
|
|
* system to speed up operations rather than for use as persistent storage.
|
|
*
|
|
* Ini file setup:
|
|
* 'Name'=(Type=DDCBackend, Bucket="XXX", LocalStorage=True/False, RemoteStorage=True/False)
|
|
*
|
|
* Required Values:
|
|
* 'Name': The backend name in the hierarchy.
|
|
*
|
|
* Optional Values:
|
|
* Bucket: An alphanumeric identifier used to group the payloads together in storage. [Default="BulkData"]
|
|
* LocalStorage: When set to true, the payloads can be stored locally. [Default=true]
|
|
* RemoteStorage: When set to true, the payloads can be stored remotely. [Default=true]
|
|
*/
|
|
class FDDCBackend final : public IVirtualizationBackend
|
|
{
|
|
public:
|
|
explicit FDDCBackend(FStringView ConfigName, FStringView InDebugName);
|
|
virtual ~FDDCBackend() = default;
|
|
|
|
private:
|
|
/* IVirtualizationBackend implementation */
|
|
|
|
virtual bool Initialize(const FString& ConfigEntry) override;
|
|
|
|
virtual EPushResult PushData(const FPayloadId& Id, const FCompressedBuffer& Payload, const FPackagePath& PackageContext) override;
|
|
|
|
virtual FCompressedBuffer PullData(const FPayloadId& Id) override;
|
|
|
|
virtual bool DoesPayloadExist(const FPayloadId& Id) override;
|
|
|
|
private:
|
|
/** The bucket being used to group together the virtualized payloads in storage */
|
|
FString BucketName;
|
|
|
|
/** The FCacheBucket used with the DDC, cached to avoid recreating it for each request */
|
|
UE::DerivedData::FCacheBucket Bucket;
|
|
|
|
/** The policy to use when uploading or downloading data from the cache */
|
|
UE::DerivedData::ECachePolicy TransferPolicy;
|
|
/** The policy to use when querying the cache for information */
|
|
UE::DerivedData::ECachePolicy QueryPolicy;
|
|
};
|
|
|
|
} // namespace UE::Virtualization
|