FSourceControlFileStatusMonitor

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.

Unreal Engine C++ API Reference > Developer > SourceControl

Inheritance Hierarchy

References

   
Module SourceControl
Header /Engine/Source/Developer/SourceControl/Public/SourceControlFileStatusMonitor.h
Include #include "SourceControlFileStatusMonitor.h"

Syntax

class FSourceControlFileStatusMonitor : public [TSharedFromThis< FSourceControlFileStatusMonitor >](API\Runtime\Core\Templates\TSharedFromThis)  

Remarks

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.

Constructors

Type Name Description
  FSourceControlFileStatusMonitor ()  

Destructors

Type Name Description
  ~FSourceControlFileStatusMonitor ()  

Functions

Type Name Description
int32 GetMaxFilePerRequestPolicy ()  
TSet< FStrin... GetMonitoredFiles ( uintptr_t OwnerId ) Returns the set of files being monitored by the specifed owner.
FTimespan GetNewRequestProbationPeriodPolicy ()  
TOptional< F... GetStatusAge ( const FString& AbsPathname ) Returns the file status age, i.e. (now - last_status_update) if the file is monitored.
FTimespan GetUpdateStatusPeriodPolicy ()  
void SetMaxFilePerRequestPolicy ( int32 MaxNum ) Sets the maximum number of files to batch into a single request.
void SetMonitoringFiles ( uintptr_t OwnerId, TSet< FString >&& AbsPathnames, FOnSourceControlFileStatus OnSource... ) 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.
void SetNewRequestProbationPeriodPolicy ( const FTimespan& InPropbationPerio... ) Set the times waited before a newly added file status request is sent to the source control provider.
void SetSuspendMonitoringPolicy ( TFunction< bool()> IsMonitoringSusp... ) 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.
void SetUpdateStatusPeriodPolicy ( const FTimespan& InRefreshPeriod ) Set the status refresh period.
void StartMonitoringFile ( uintptr_t OwnerId, const FString& AbsPathname, FOnSourceControlFileStatus OnSource... ) Starts monitoring the source control status of the specified file.
void StartMonitoringFiles ( uintptr_t OwnerId, const TArray< FString >& AbsPathna..., FOnSourceControlFileStatus OnSource... )  
void StartMonitoringFiles ( uintptr_t OwnerId, const TSet< FString >& AbsPathname..., FOnSourceControlFileStatus OnSource... )  
void StopMonitoringFile ( uintptr_t OwnerId, const FString& AbsPathname ) Stops monitoring the source control status of the specified file.
void StopMonitoringFiles ( uintptr_t OwnerId ) Stops monitoring all the files that were registered by the specified owner Id.
void StopMonitoringFiles ( uintptr_t OwnerId, const TArray< FString >& AbsPathna... ) Stops monitoring the source control status of the specified file.
void StopMonitoringFiles ( uintptr_t OwnerId, const TSet< FString >& AbsPathname... ) Stops monitoring the source control status of the specified file.

Typedefs

Name Description
FOnSourceControlFileStatus Invoked when the status of a source controlled files is updated.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library