다음을 통해 공유


ServicePackageActivationMode Enum

Definition

Describes service package activation mode for a Service Fabric service. This is specified at the time of creating the Service (using CreateServiceAsync(ServiceDescription)) or ServiceGroup (using CreateServiceGroupAsync(ServiceGroupDescription)) via ServicePackageActivationMode.

If no value is specified while creating the Service or ServiceGroup, then it defaults to SharedProcess mode.

public enum ServicePackageActivationMode
type ServicePackageActivationMode = 
Public Enum ServicePackageActivationMode
Inheritance
ServicePackageActivationMode

Fields

Name Value Description
SharedProcess 0

This is the default activation mode. With this activation mode, replica(s) or instance(s) from different partition(s) of service, on a given node, will share same activation of service package on a node.

ExclusiveProcess 1

With this activation mode, each replica or instance of service, on a given node, will have its own dedicated activation of service package on a node.

Remarks

Consider an example where you have an ApplicationType 'AppTypeA' which contains ServicePackage 'ServicePackageA' which registers 'ServiceTypeA' and you create many Service(s) of 'ServiceTypeA'. Say 'fabric:/App1_of_AppTypeA/Serv_1' to 'fabric:/App1_of_AppTypeA/Serv_N' with ServicePackageActivation mode SharedProcess and 'fabric:/App1_of_AppTypeA/Serv_11' to 'fabric:/App1_of_AppTypeA/Serv_NN' with ServicePackageActivation mode ExclusiveProcess.

On a given node, replica (or instance) of service 'fabric:/App1_of_AppTypeA/Serv_1' to 'fabric:/App1_of_AppTypeA/Serv_N' will be placed inside the same activation of 'ServicePackageA' whose ServicePackageActivationId will always be an empty string. However, replica (or instance) of each of 'fabric:/App1_of_AppTypeA/Serv_11' to 'fabric:/App1_of_AppTypeA/Serv_NN' will be placed in its own dedicated activation of 'ServicePackageA' and each of these activation will have a unique non-empty string as ServicePackageActivationId.

After you have created your service, you can obtain ServicePackageActivationId of activated ServicePackage(s) on a node by querying DeployedServicePackageList on that node using GetDeployedServicePackageListAsync(String, Uri).

Applies to