59 строки
7.8 KiB
YAML
59 строки
7.8 KiB
YAML
### YamlMime:JavaType
|
|
methods:
|
|
- fullName: system.fabric.StateReplicator.getCopyStream()
|
|
name: getCopyStream()
|
|
nameWithType: StateReplicator.getCopyStream()
|
|
returns:
|
|
description: <p>The returned CopyStream contains <xref uid="system.fabric.OperationData" data-throw-if-not-resolved="false" data-raw-source="OperationData"></xref> objects that implement <xref uid="system.fabric.Operation" data-throw-if-not-resolved="false" data-raw-source="Operation"></xref>. The <xref uid="system.fabric.OperationData" data-throw-if-not-resolved="false" data-raw-source="OperationData"></xref> objects are obtained from the CopyState <xref uid="system.fabric.OperationDataStream" data-throw-if-not-resolved="false" data-raw-source="OperationDataStream"></xref> that the Primary replica returns from <xref uid="system.fabric.StateProvider.getCopyState(SequenceNumber,OperationDataStream)" data-throw-if-not-resolved="false" data-raw-source="StateProvider#getCopyState(SequenceNumber, OperationDataStream)"></xref>. When a replica is created and has to catch up, it should obtain the CopyStream and begin to send, apply, and acknowledge the Copy objects that implement <xref uid="system.fabric.Operation" data-throw-if-not-resolved="false" data-raw-source="Operation"></xref>. In parallel, the replica responds to the corresponding <xref uid="system.fabric.StateProvider.getCopyContext()" data-throw-if-not-resolved="false" data-raw-source="StateProvider#getCopyContext()"></xref> and <xref uid="system.fabric.OperationDataStream.getNextAsync(CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="OperationDataStream#getNextAsync(CancellationToken)"></xref>calls. The stream is empty when the returned <xref uid="system.fabric.Operation" data-throw-if-not-resolved="false" data-raw-source="Operation"></xref> method is null. </p>
|
|
type: <xref href="system.fabric.OperationStream?alt=system.fabric.OperationStream&text=OperationStream" data-throw-if-not-resolved="False"/>
|
|
summary: <p>Gets copy stream </p>
|
|
syntax: public OperationStream getCopyStream()
|
|
uid: system.fabric.StateReplicator.getCopyStream()
|
|
- fullName: system.fabric.StateReplicator.getReplicationStream()
|
|
name: getReplicationStream()
|
|
nameWithType: StateReplicator.getReplicationStream()
|
|
returns:
|
|
description: <p>The ReplicationStream implements <xref uid="system.fabric.OperationStream" data-throw-if-not-resolved="false" data-raw-source="OperationStream"></xref>. The ReplicationStream contains <xref uid="system.fabric.OperationData" data-throw-if-not-resolved="false" data-raw-source="OperationData"></xref> objects that implement <xref uid="system.fabric.Operation" data-throw-if-not-resolved="false" data-raw-source="Operation"></xref>. The objects are provided by the Primary replica via <xref uid="system.fabric.StateReplicator.replicateAsync(OperationData,SequenceNumber,CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="StateReplicator#replicateAsync(OperationData, SequenceNumber, CancellationToken)"></xref>. Generally a Secondary replica should send <xref uid="system.fabric.OperationStream.getOperationAsync(CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="OperationStream#getOperationAsync(CancellationToken)"></xref>. Although Service Fabric does not require services to do so, generally services should transfer all <xref uid="system.fabric.OperationData" data-throw-if-not-resolved="false" data-raw-source="OperationData"></xref> objects out of the copy stream first, and then transfer operations out of the replication stream. The transfer from both copies in parallel is supported but increases the complexity of applying state updates correctly and is recommended only for advanced services. The stream is empty when the returned <xref uid="system.fabric.Operation" data-throw-if-not-resolved="false" data-raw-source="Operation"></xref> method is null. </p>
|
|
type: <xref href="system.fabric.OperationStream?alt=system.fabric.OperationStream&text=OperationStream" data-throw-if-not-resolved="False"/>
|
|
summary: <p>Gets replication stream. </p>
|
|
syntax: public OperationStream getReplicationStream()
|
|
uid: system.fabric.StateReplicator.getReplicationStream()
|
|
- fullName: system.fabric.StateReplicator.replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken)
|
|
name: replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken)
|
|
nameWithType: StateReplicator.replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken)
|
|
parameters:
|
|
- description: <p>Represents the state change that the Primary replica wants to replicate. </p>
|
|
name: operationData
|
|
type: <xref href="system.fabric.OperationData?alt=system.fabric.OperationData&text=OperationData" data-throw-if-not-resolved="False"/>
|
|
- description: <p>Long, the LSN of the operation. Note that this is the same value which is returned by the task. Providing it as an out parameter is useful for services which want to prepare the local write to commit when the task finishes. </p>
|
|
name: sequenceNumber
|
|
type: <xref href="system.fabric.SequenceNumber?alt=system.fabric.SequenceNumber&text=SequenceNumber" data-throw-if-not-resolved="False"/>
|
|
- description: <p>A write quorum of replicas that have been lost. 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. </p>
|
|
name: cancellationToken
|
|
type: <xref href="system.fabric.CancellationToken?alt=system.fabric.CancellationToken&text=CancellationToken" data-throw-if-not-resolved="False"/>
|
|
returns:
|
|
description: <p>Returns completable future of type long, the LSN of the operation. </p>
|
|
type: CompletableFuture<<xref href="system.fabric.SequenceNumber?alt=system.fabric.SequenceNumber&text=SequenceNumber" data-throw-if-not-resolved="False"/>>
|
|
summary: <p>Replicates state changes from Primary replica to the Secondary replicas and receives a quorum acknowledgement that those state changes have been applied. </p>
|
|
syntax: public CompletableFuture<SequenceNumber> replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken)
|
|
uid: system.fabric.StateReplicator.replicateAsync(OperationData,SequenceNumber,CancellationToken)
|
|
- fullName: system.fabric.StateReplicator.updateReplicatorSettings(ReplicatorSettings settings)
|
|
name: updateReplicatorSettings(ReplicatorSettings settings)
|
|
nameWithType: StateReplicator.updateReplicatorSettings(ReplicatorSettings settings)
|
|
parameters:
|
|
- description: <p>The new <xref uid="system.fabric.ReplicatorSettings" data-throw-if-not-resolved="false" data-raw-source="ReplicatorSettings"></xref> with updated credentials. </p>
|
|
name: settings
|
|
type: <xref href="system.fabric.ReplicatorSettings?alt=system.fabric.ReplicatorSettings&text=ReplicatorSettings" data-throw-if-not-resolved="False"/>
|
|
summary: <p>Enables modification of replicator settings during runtime. The only setting which can be modified is the security credentials. </p>
|
|
syntax: public void updateReplicatorSettings(ReplicatorSettings settings)
|
|
uid: system.fabric.StateReplicator.updateReplicatorSettings(ReplicatorSettings)
|
|
nameWithType: StateReplicator
|
|
syntax: public interface StateReplicator
|
|
type: interface
|
|
uid: system.fabric.StateReplicator
|
|
fullName: system.fabric.StateReplicator
|
|
name: StateReplicator
|
|
package: system.fabric
|
|
summary: <p>Exposes replication related functions of the <xref uid="system.fabric.FabricReplicator" data-throw-if-not-resolved="false" data-raw-source="FabricReplicator"></xref> class that are used by <xref uid="system.fabric.StateProvider" data-throw-if-not-resolved="false" data-raw-source="StateProvider"></xref> to replicate state to ensure high availability. </p>
|
|
metadata: {}
|