Freigeben über


FabricReplicator Class

public class FabricReplicator implements Replicator

Replicates state for high availability and reliability.

Remarks:Provides the default implementation of the StateReplicator, Replicator, and PrimaryReplicator interfaces, which user services can use, along with their implementation of the StateProvider interface. An instance of the system.fabric.FabricReplicator class is obtained via the createReplicator(StateProvider stateProvider, ReplicatorSettings replicatorSettings) method, which can be cast to StateReplicator for use.

Constructor Summary

Constructor Description
FabricReplicator(long replicator)

Creates instance of FabricReplicator.

Method Summary

Modifier and Type Method and Description
void abort()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture buildReplicaAsync(ReplicaInformation replicaInfo, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture changeRoleAsync(Epoch epoch, ReplicaRole role, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture closeAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

long getCatchUpCapability()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

long getCurrentProgress()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture<Boolean> onDataLossAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture<String> openAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

void removeReplica(long replicaId)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Remarks: This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

void updateCatchUpReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration, ReplicaSetConfiguration previousConfiguration)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

void updateCurrentReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Remarks: This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture updateEpochAsync(Epoch epoch, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

CompletableFuture waitForCatchUpQuorumAsync(ReplicaSetQuorumMode quorumMode, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

For Internal Use Only.

Constructor Details

FabricReplicator

protected FabricReplicator(long replicator)

Creates instance of FabricReplicator.

Parameters:

replicator - pointer to native replicator.

Method Details

abort

public void abort()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.abort()

buildReplicaAsync

public CompletableFuture buildReplicaAsync(ReplicaInformation replicaInfo, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.buildReplicaAsync(ReplicaInformation replicaInfo, CancellationToken cancellationToken)

Parameters:

replicaInfo - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.
cancellationToken -

CancellationToken object to indicate the cancellation status of the operation.

Returns:

A future that represents the asynchronous operation. The future completes exceptionally with FabricException for fabric related failures.

changeRoleAsync

public CompletableFuture changeRoleAsync(Epoch epoch, ReplicaRole role, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.changeRoleAsync(Epoch epoch, ReplicaRole role, CancellationToken cancellationToken)

Parameters:

epoch - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.
role - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.
cancellationToken - The CancellationToken object that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation might still be completed even if it is canceled.

Returns:

A future that represents the asynchronous operation. The future completes exceptionally with FabricException for fabric related failures.

closeAsync

public CompletableFuture closeAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.closeAsync(CancellationToken cancellationToken)

Parameters:

cancellationToken - The CancellationToken object that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation might still be completed even if it is canceled.

Returns:

A future that represents the asynchronous operation. The future completes exceptionally with FabricException for fabric related failures.

getCatchUpCapability

public long getCatchUpCapability()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.getCatchUpCapability()

Returns:

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

getCurrentProgress

public long getCurrentProgress()

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.getCurrentProgress()

Returns:

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

onDataLossAsync

public CompletableFuture onDataLossAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.onDataLossAsync(CancellationToken cancellationToken)

Parameters:

cancellationToken -

CancellationToken object to indicate the cancellation status of the operation.

Returns:

A CompletableFuture that represents the asynchronous operation. The future completes exceptionally with FabricException for fabric related failures.

openAsync

public CompletableFuture openAsync(CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.openAsync(CancellationToken cancellationToken)

Parameters:

cancellationToken - The CancellationToken object that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation might still be completed even if it is canceled.

Returns:

A future that represents the asynchronous operation. The future completes exceptionally with FabricException for fabric related failures.

removeReplica

public void removeReplica(long replicaId)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Remarks: This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.removeReplica(long replicaId)

Parameters:

replicaId - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

updateCatchUpReplicaSetConfiguration

public void updateCatchUpReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration, ReplicaSetConfiguration previousConfiguration)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.updateCatchUpReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration, ReplicaSetConfiguration previousConfiguration)

Parameters:

currentConfiguration - For Internal Use Only.
previousConfiguration - For Internal Use Only.

updateCurrentReplicaSetConfiguration

public void updateCurrentReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Remarks: This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.updateCurrentReplicaSetConfiguration(ReplicaSetConfiguration currentConfiguration)

Parameters:

currentConfiguration - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

updateEpochAsync

public CompletableFuture updateEpochAsync(Epoch epoch, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

Overrides:

FabricReplicator.updateEpochAsync(Epoch epoch, CancellationToken cancellationToken)

Parameters:

epoch - This supports the Service Fabric infrastructure and is not meant to be used directly from your code.
cancellationToken - The CancellationToken object that the operation is observing. It can be used to send a notification that the operation should be canceled. Note that cancellation is advisory and that the operation might still be completed even if it is canceled.

Returns:

This supports the Service Fabric infrastructure and is not meant to be used directly from your code. The future completes exceptionally with FabricException for fabric related failures.

waitForCatchUpQuorumAsync

public CompletableFuture waitForCatchUpQuorumAsync(ReplicaSetQuorumMode quorumMode, CancellationToken cancellationToken)

This supports the Service Fabric infrastructure and is not meant to be used directly from your code.

For Internal Use Only.

Overrides:

FabricReplicator.waitForCatchUpQuorumAsync(ReplicaSetQuorumMode quorumMode, CancellationToken cancellationToken)

Parameters:

quorumMode - For Internal Use Only.
cancellationToken -

CancellationToken object to indicate the cancellation status of the operation.

Returns:

A future that represents asynchrnous completion. The future completes exceptionally with FabricException for fabric related failures.

Applies to