Navigation
API > API/Developer > API/Developer/SourceControl
Periodically monitors the source controlled status of a collection of files and notifies the latest status, including potential warnings such as 'out of date', 'locked by other', etc. This service is meant to throttle and batch non-time sensitive FUpdateStatus requests to the source control provider because those requests are expensive and can add an undesired load on the provider server.
| Name | FSourceControlFileStatusMonitor |
| Type | class |
| Header File | /Engine/Source/Developer/SourceControl/Public/SourceControlFileStatusMonitor.h |
| Include Path | #include "SourceControlFileStatusMonitor.h" |
Syntax
class FSourceControlFileStatusMonitor : public TSharedFromThis< FSourceControlFileStatusMonitor >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FSourceControlFileStatusMonitor
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSourceControlFileStatusMonitor() |
SourceControlFileStatusMonitor.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSourceControlFileStatusMonitor() |
SourceControlFileStatusMonitor.h |
Structs
| Name | Remarks |
|---|---|
| FSourceControlFileStatus | |
| FUintptrHash | Some compilers were ambigous when picking a Hash function for uintprt_t, provide a custom one. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnSourceControlFileStatus | TBaseDelegate_TwoParams< void, const FString &, const ISourceControlState * > | Invoked when the status of a source controlled files is updated. | SourceControlFileStatusMonitor.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LastAddedFileTimeSecs | double | Last time a file was assed to the list of monitored files. | SourceControlFileStatusMonitor.h | |
| LastSourceControlCheckSecs | double | Last time a request to the source control provider was issued. | SourceControlFileStatusMonitor.h | |
| MaxFileNumPerRequestPolicy | int32 | The maximum number of files allowed to be batched together for a request to the provider. | SourceControlFileStatusMonitor.h | |
| MonitoredFiles | TMap< FString, TSharedPtr< FSourceControlFileStatus > > | The files currently monitored, mapping absolute file pathname to the monitored information. | SourceControlFileStatusMonitor.h | |
| NewAddedFileCount | int32 | Number of files newly added that are in probation. | SourceControlFileStatusMonitor.h | |
| OldestFileStatusTimeSecs | double | The oldest status update time. | SourceControlFileStatusMonitor.h | |
| ProbationPeriodPolicy | FTimespan | The newly added files probation period. Time left to batch several files into the same requests. | SourceControlFileStatusMonitor.h | |
| RefreshPeriodPolicy | FTimespan | The status refresh period. Time left until we re-request a file status. | SourceControlFileStatusMonitor.h | |
| RequestedStatusFiles | TArray< FString > | The list of files for which a request to the source control provider is currently in-flight/ongoing. | SourceControlFileStatusMonitor.h | |
| SourceControlProviderChangedDelegateHandle | FDelegateHandle | Handle of the registered source provider change delegate. | SourceControlFileStatusMonitor.h | |
| SuspendMonitoringPolicy | TFunction< bool()> | Invoked to detect wheter the monitoring is paused/suspended (no request to source control provider). | SourceControlFileStatusMonitor.h | |
| TickerHandle | FTSTicker::FDelegateHandle | Handle for the tick. | SourceControlFileStatusMonitor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetMaxFilePerRequestPolicy() |
SourceControlFileStatusMonitor.h | ||
TSet< FString > GetMonitoredFiles
(
uintptr_t OwnerId |
Returns the set of files being monitored by the specifed owner. | SourceControlFileStatusMonitor.h | |
FTimespan GetNewRequestProbationPeriodPolicy() |
SourceControlFileStatusMonitor.h | ||
TOptional< FTimespan > GetStatusAge
(
const FString& AbsPathname |
Returns the file status age, i.e. (now - last_status_update) if the file is monitored. | SourceControlFileStatusMonitor.h | |
FTimespan GetUpdateStatusPeriodPolicy() |
SourceControlFileStatusMonitor.h | ||
void SetMaxFilePerRequestPolicy
(
int32 MaxNum |
Sets the maximum number of files to batch into a single request. | SourceControlFileStatusMonitor.h | |
void SetMonitoringFiles
(
uintptr_t OwnerId, |
Starts monitoring files that weren't monitored yet by the specified owner, stops monitoring those that were monitored by the owner but are not in the updated list and keep monitoring files that were monitored before and still in the updated list. | SourceControlFileStatusMonitor.h | |
void SetNewRequestProbationPeriodPolicy
(
const FTimespan& InPropbationPeriod |
Set the times waited before a newly added file status request is sent to the source control provider. | SourceControlFileStatusMonitor.h | |
void SetSuspendMonitoringPolicy
(
TFunction< bool()> IsMonitoringSuspended |
Sets a function invoked to detect if the monitor should suspend its activities, for example, if no user is currently interacting with the application, it may not worth checking the file status periodically. | SourceControlFileStatusMonitor.h | |
void SetUpdateStatusPeriodPolicy
(
const FTimespan& InRefreshPeriod |
Set the status refresh period. | SourceControlFileStatusMonitor.h | |
void StartMonitoringFile
(
uintptr_t OwnerId, |
Starts monitoring the source control status of the specified file. | SourceControlFileStatusMonitor.h | |
void StartMonitoringFiles
(
uintptr_t OwnerId, |
SourceControlFileStatusMonitor.h | ||
void StartMonitoringFiles
(
uintptr_t OwnerId, |
SourceControlFileStatusMonitor.h | ||
void StopMonitoringFile
(
uintptr_t OwnerId, |
Stops monitoring the source control status of the specified file. | SourceControlFileStatusMonitor.h | |
void StopMonitoringFiles
(
uintptr_t OwnerId |
Stops monitoring all the files that were registered by the specified owner Id. | SourceControlFileStatusMonitor.h | |
void StopMonitoringFiles
(
uintptr_t OwnerId, |
SourceControlFileStatusMonitor.h | ||
void StopMonitoringFiles
(
uintptr_t OwnerId, |
SourceControlFileStatusMonitor.h |