StatefulServiceBase.BackupAsync Method

Definition

Overloads

BackupAsync(BackupDescription)

Performs a backup of all reliable state managed by this StatefulServiceBase.

BackupAsync(BackupDescription, TimeSpan, CancellationToken)

Performs a backup of all reliable state managed by this StatefulServiceBase.

BackupAsync(BackupDescription)

Performs a backup of all reliable state managed by this StatefulServiceBase.

public System.Threading.Tasks.Task BackupAsync (Microsoft.ServiceFabric.Data.BackupDescription backupDescription);
member this.BackupAsync : Microsoft.ServiceFabric.Data.BackupDescription -> System.Threading.Tasks.Task
Public Function BackupAsync (backupDescription As BackupDescription) As Task

Parameters

backupDescription
BackupDescription

A BackupDescription describing the backup request.

Returns

Task that represents the asynchronous backup operation.

Applies to

BackupAsync(BackupDescription, TimeSpan, CancellationToken)

Performs a backup of all reliable state managed by this StatefulServiceBase.

public System.Threading.Tasks.Task BackupAsync (Microsoft.ServiceFabric.Data.BackupDescription backupDescription, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.BackupAsync : Microsoft.ServiceFabric.Data.BackupDescription * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function BackupAsync (backupDescription As BackupDescription, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

backupDescription
BackupDescription

A BackupDescription describing the backup request.

timeout
TimeSpan

The timeout for this operation.

cancellationToken
CancellationToken

The cancellation token is used to monitor for cancellation requests.

Returns

Task that represents the asynchronous backup operation.

Remarks

Boolean returned by the backupCallback indicate whether the service was able to successfully move the backup folder to an external location. If false is returned, BackupAsync throws InvalidOperationException with the relevant message indicating backupCallback returned false. Also, backup will be marked as unsuccessful.

Applies to