RestoreContext Class

  • java.lang.Object
    • microsoft.servicefabric.data.RestoreContext

public class RestoreContext

RestoreContext contains the restoreAsync(RestoreDescription restoreDescription) that can be used to restore the state of the replica from a backup.

Constructor Summary

Constructor Description
RestoreContext(StateProviderReplica stateProviderReplica)

Initializes a new instance of the RestoreContext structure.

Method Summary

Modifier and Type Method and Description
CompletableFuture<?> restoreAsync(RestoreDescription restoreDescription)

Restores a backup described by RestoreDescription.

CompletableFuture<?> restoreAsync(RestoreDescription restoreDescription, Duration timeout, CancellationToken cancellationToken)

Restores a backup described by RestoreDescription.

Constructor Details

RestoreContext

public RestoreContext(StateProviderReplica stateProviderReplica)

Initializes a new instance of the RestoreContext structure.

Parameters:

stateProviderReplica - An StateProviderReplica representing a reliable state provider replica.

Method Details

restoreAsync

public CompletableFuture restoreAsync(RestoreDescription restoreDescription)

Restores a backup described by RestoreDescription.

Parameters:

restoreDescription - Description for the restore request.

Returns:

Task that represents the asynchronous restore operation.

restoreAsync

public CompletableFuture restoreAsync(RestoreDescription restoreDescription, Duration timeout, CancellationToken cancellationToken)

Restores a backup described by RestoreDescription.

Parameters:

restoreDescription - Description for the restore request.
timeout - The timeout for this operation.
cancellationToken - The token to monitor for cancellation requests.

Returns:

Task that represents the asynchronous restore operation.

Applies to