You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Devin.Doucette #rnx #preflight 61307f101a52e20001978a10 - This backend replaces the plans for a backend that interfaces with Zen directly. - The backend has no real context for each payload being pushed at the moment, for now we pass in a dummy string. - Currently we make blocking calls to the cache. When making the initial push to local storage this is desired as it will take place during package save. However both pulling the payload and making the submission to persistent storage should be able to be made async in the future. - The storage policy is currently exposed via the ini file for now. We might want to enforce policies for this at a later time. #ROBOMERGE-SOURCE: CL 17416948 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139) [CL 17416956 by paul chipchase in ue5-release-engine-test branch]
56 lines
1.8 KiB
C++
56 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Virtualization/IVirtualizationBackend.h"
|
|
|
|
namespace UE::DerivedData { enum class ECachePolicy : uint8; }
|
|
|
|
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 : public IVirtualizationBackend
|
|
{
|
|
public:
|
|
explicit FDDCBackend(FStringView ConfigName);
|
|
virtual ~FDDCBackend() = default;
|
|
|
|
protected:
|
|
|
|
virtual bool Initialize(const FString& ConfigEntry) override;
|
|
|
|
virtual EPushResult PushData(const FPayloadId& Id, const FCompressedBuffer& Payload) override;
|
|
|
|
virtual FCompressedBuffer PullData(const FPayloadId& Id) override;
|
|
|
|
virtual FString GetDebugString() const override;
|
|
|
|
bool DoesExist(const FPayloadId& Id) const;
|
|
|
|
/** Debug name used to identify the backend */
|
|
FString DebugName;
|
|
|
|
/** The bucket being used to group together the virtualized payloads in storage */
|
|
FString BucketName;
|
|
|
|
/** 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
|