azure-docs-sdk-java/docs-ref-autogen/system.fabric.StatefulServi...

109 строки
10 KiB
YAML
Исходник Постоянная ссылка Ответственный История

Этот файл содержит неоднозначные символы Юникода!

Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.

### YamlMime:JavaType
methods:
- fullName: system.fabric.StatefulServiceReplica.abort()
name: abort()
nameWithType: StatefulServiceReplica.abort()
summary: >-
<p>Ungracefully terminates an instance. </p>
<p>
<b>Remarks:</b>Lease loss and, in response to the service, the use of <xref uid="system.fabric.ServicePartition.reportFault(FaultType)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ServicePartition#reportFault(FaultType)"></xref> to report a <xref uid="system.fabric.FaultType.Permanent" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FaultType#Permanent"></xref> fault are examples of ungraceful termination. When this method is invoked, the service instance should immediately release and clean up all references and return. </p>
syntax: public void abort()
uid: system.fabric.StatefulServiceReplica.abort()
- fullName: system.fabric.StatefulServiceReplica.changeRoleAsync(ReplicaRole newRole, CancellationToken cancellationToken)
name: changeRoleAsync(ReplicaRole newRole, CancellationToken cancellationToken)
nameWithType: StatefulServiceReplica.changeRoleAsync(ReplicaRole newRole, CancellationToken cancellationToken)
parameters:
- description: <p>The updated <xref uid="system.fabric.ReplicaRole" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ReplicaRole"></xref> that this replica should transition to. </p>
name: newRole
type: <xref href="system.fabric.ReplicaRole?alt=system.fabric.ReplicaRole&text=ReplicaRole" data-throw-if-not-resolved="False"/>
- description: >-
<p>
<xref uid="system.fabric.CancellationToken" data-throw-if-not-resolved="false" data-raw-source="system.fabric.CancellationToken"></xref> object to indicate the cancellation status of the operation. </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 <xref uid="" data-throw-if-not-resolved="false" data-raw-source="CompletableFuture"></xref> of type <xref uid="" data-throw-if-not-resolved="false" data-raw-source="java.lang.String"></xref>, the services new connection address that is to be associated with the replica via Service Fabric Naming. </p>
type: <xref href="CompletableFuture%3CString%3E?alt=CompletableFuture%3CString%3E&text=CompletableFuture%3CString%3E" data-throw-if-not-resolved="False"/>
summary: >-
<p>Changes the role of a Primary or Secondary replica.</p>
<p>
<b>Remarks:</b>The new role is indicated as a parameter. When the service transitions to the new role, the service has a chance to update its current listening address. The listening address is the address where clients connect to it. This enables the service when it is a Primary replica to only claim some resources such as ports when communication from clients is expected. </p>
syntax: public CompletableFuture<String> changeRoleAsync(ReplicaRole newRole, CancellationToken cancellationToken)
uid: system.fabric.StatefulServiceReplica.changeRoleAsync(ReplicaRole,CancellationToken)
- fullName: system.fabric.StatefulServiceReplica.closeAsync(CancellationToken cancellationToken)
name: closeAsync(CancellationToken cancellationToken)
nameWithType: StatefulServiceReplica.closeAsync(CancellationToken cancellationToken)
parameters:
- description: >-
<p>
<xref uid="system.fabric.CancellationToken" data-throw-if-not-resolved="false" data-raw-source="system.fabric.CancellationToken"></xref> object to indicate the cancellation status of the operation. </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 <xref uid="" data-throw-if-not-resolved="false" data-raw-source="CompletableFuture"></xref>. </p>
type: <xref href="CompletableFuture%3CVoid%3E?alt=CompletableFuture%3CVoid%3E&text=CompletableFuture%3CVoid%3E" data-throw-if-not-resolved="False"/>
summary: >-
<p>Closes the service replica when it is being shut down. Note that cancellation is advisory and that the operation might still be completed even if it is canceled.</p>
<p></p>
syntax: public CompletableFuture<Void> closeAsync(CancellationToken cancellationToken)
uid: system.fabric.StatefulServiceReplica.closeAsync(CancellationToken)
- fullName: system.fabric.StatefulServiceReplica.initialize(StatefulServiceInitializationParameters initializationParameters)
name: initialize(StatefulServiceInitializationParameters initializationParameters)
nameWithType: StatefulServiceReplica.initialize(StatefulServiceInitializationParameters initializationParameters)
parameters:
- description: <p>The <xref uid="system.fabric.StatefulServiceInitializationParameters" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServiceInitializationParameters"></xref> for this replica. </p>
name: initializationParameters
type: <xref href="system.fabric.StatefulServiceInitializationParameters?alt=system.fabric.StatefulServiceInitializationParameters&text=StatefulServiceInitializationParameters" data-throw-if-not-resolved="False"/>
summary: >-
<p>Initializes a newly created service replica.</p>
<p></p>
syntax: public void initialize(StatefulServiceInitializationParameters initializationParameters)
uid: system.fabric.StatefulServiceReplica.initialize(StatefulServiceInitializationParameters)
- fullName: system.fabric.StatefulServiceReplica.openAsync(ReplicaOpenMode openMode, StatefulServicePartition partition, CancellationToken cancellationToken)
name: openAsync(ReplicaOpenMode openMode, StatefulServicePartition partition, CancellationToken cancellationToken)
nameWithType: StatefulServiceReplica.openAsync(ReplicaOpenMode openMode, StatefulServicePartition partition, CancellationToken cancellationToken)
parameters:
- description: <p>This supports the Service Fabric infrastructure and is not meant to be used directly from your code. </p>
name: openMode
type: <xref href="system.fabric.ReplicaOpenMode?alt=system.fabric.ReplicaOpenMode&text=ReplicaOpenMode" data-throw-if-not-resolved="False"/>
- description: <p>The <xref uid="system.fabric.StatefulServicePartition" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServicePartition"></xref> information for this replica. </p>
name: partition
type: <xref href="system.fabric.StatefulServicePartition?alt=system.fabric.StatefulServicePartition&text=StatefulServicePartition" data-throw-if-not-resolved="False"/>
- description: >-
<p>
<xref uid="system.fabric.CancellationToken" data-throw-if-not-resolved="false" data-raw-source="system.fabric.CancellationToken"></xref> object to indicate the cancellation status of the operation. </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 <xref uid="" data-throw-if-not-resolved="false" data-raw-source="CompletableFuture"></xref>&lt;<xref uid="system.fabric.Replicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.Replicator"></xref>&gt;, the <xref uid="system.fabric.Replicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.Replicator"></xref> that is used by the stateful service. To use the Service Fabric implementation, in <xref uid="system.fabric.StatefulServiceReplica.openAsync(ReplicaOpenMode,StatefulServicePartition,CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServiceReplica#openAsync(ReplicaOpenMode, StatefulServicePartition, CancellationToken)"></xref> , the replica should return a <xref uid="system.fabric.FabricReplicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FabricReplicator"></xref> that is obtained from <xref uid="system.fabric.StatefulServicePartition.createReplicator(StateProvider,ReplicatorSettings)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServicePartition#createReplicator(StateProvider, ReplicatorSettings)"></xref></p>
type: CompletableFuture&lt;<xref href="system.fabric.Replicator?alt=system.fabric.Replicator&text=Replicator" data-throw-if-not-resolved="False"/>&gt;
summary: >-
<p>Opens an initialized service replica so that additional actions can be taken.</p>
<p></p>
syntax: public CompletableFuture<Replicator> openAsync(ReplicaOpenMode openMode, StatefulServicePartition partition, CancellationToken cancellationToken)
uid: system.fabric.StatefulServiceReplica.openAsync(ReplicaOpenMode,StatefulServicePartition,CancellationToken)
nameWithType: StatefulServiceReplica
syntax: public interface StatefulServiceReplica
type: interface
uid: system.fabric.StatefulServiceReplica
fullName: system.fabric.StatefulServiceReplica
name: StatefulServiceReplica
package: system.fabric
summary: >-
<p>Defines behavior that governs the lifecycle of a replica, such as startup, initialization, role changes, and shutdown. </p>
<p>
<b>Remarks:</b>Stateful service types must implement this interface. The logic of a stateful service type includes behavior that is invoked on Primary replicas and behavior that is invoked on Secondary replicas. If the service author wants to make use of the provided <xref uid="system.fabric.FabricReplicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FabricReplicator"></xref>, then the service must also implement <xref uid="system.fabric.StateProvider" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StateProvider"></xref> to use the implementation of <xref uid="system.fabric.StateReplicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StateReplicator"></xref> that is provided by <xref uid="system.fabric.FabricReplicator" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FabricReplicator"></xref></p>
metadata: {}