你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

StatefulServiceFactory Interface

public interface StatefulServiceFactory

Represents a stateful service factory that is responsible for creating replicas of a specific type of stateful service. Stateful service factories are registered with the FabricRuntime by service hosts via system.fabric.FabricRuntime#registerStatefulServiceFactory(java.lang.String,system.fabric.StatefulServiceFactory) or system.fabric.FabricRuntime#registerStatefulServiceFactoryAsync(java.lang.String,system.fabric.StatefulServiceFactory,java.time.Duration)

Method Summary

Modifier and Type Method and Description
StatefulServiceReplica createReplica(String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long replicaId)

Called by Service Fabric to create a stateful service replica for a particular service.

Method Details

createReplica

public StatefulServiceReplica createReplica(String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long replicaId)

Called by Service Fabric to create a stateful service replica for a particular service.

Parameters:

serviceTypeName - The service type that Service Fabric requests to be created.
serviceName - The fabric:/ name (Uri) of the service with which this replica is associated.
initializationData - A byte array that contains the initialization data which was originally passed as a part of this service's service description.
partitionId - The partition ID of type, a GUID, with which this replica is associated.
replicaId - The replica ID of type long for this replica.

Returns:

Throws:

InstantiationException - On failure of instance creation
IllegalAccessException - On Access voilation

Applies to