StatelessServiceFactory Interface

public interface StatelessServiceFactory

Represents a stateless service factory that is responsible for creating instances of a specific type of stateless service.

Remarks:Stateless service factories are registered with the FabricRuntime by service hosts via system.fabric.FabricRuntime#registerStatelessServiceFactory(java.lang.String,system.fabric.StatelessServiceFactory) or system.fabric.FabricRuntime#registerStatelessServiceFactoryAsync(java.lang.String,system.fabric.StatelessServiceFactory,java.time.Duration)

Method Summary

Modifier and Type Method and Description
StatelessServiceInstance createInstance(String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long instanceId)

Creates a stateless service instance for a particular service. This method is called by Service Fabric.

Method Details

createInstance

public StatelessServiceInstance createInstance(String serviceTypeName, URI serviceName, byte[] initializationData, UUID partitionId, long instanceId)

Creates a stateless service instance for a particular service. This method is called by Service Fabric.

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 (GUID) with which this replica is associated.
instanceId - The replica ID for this replica of type long.

Returns:

Returns system.fabric.query.StatelessServiceInstance.

Throws:

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

Applies to