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, Devin.Doucette #jira UE-133497 #rnx #preflight 61f835491c5ac5523462810a - A lot of files have been touched but most of this is changing FPayload::IsValid to !FIoHash::IsZero, the main changes are in EditorBulkData/EditorBulkDataTests - The only difference between FPayloadId and FIoHash is that the former considered the hash of an invalid or empty buffer to be 'invalid' too where as FIoHash would return a valid hash -- To keep behaviour the same, we only hash payloads in EditorBulkData using a utility method ::HashBuffer which will not hash empty or invalid payloads and return a default FIoHash instead. -- Unit tests have been extended to prove that the behaviour has not changed. #ROBOMERGE-AUTHOR: paul.chipchase #ROBOMERGE-SOURCE: CL 18806362 in //UE5/Release-5.0/... via CL 18808527 via CL 18821790 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545) [CL 18822154 by paul chipchase in ue5-main 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 FIoHash& Id, const FCompressedBuffer& Payload, const FString& PackageContext) override;
|
|
|
|
virtual FCompressedBuffer PullData(const FIoHash& Id) override;
|
|
|
|
virtual bool DoesPayloadExist(const FIoHash& 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
|