Skip to main content

IStatefulServiceFactory

Trait IStatefulServiceFactory 

Source
pub trait IStatefulServiceFactory:
    Send
    + Sync
    + 'static {
    // Required method
    fn create_replica(
        &self,
        servicetypename: WString,
        servicename: Uri,
        initializationdata: &[u8],
        partitionid: GUID,
        replicaid: i64,
    ) -> Result<Box<dyn IStatefulServiceReplica>>;
}
Expand description

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 register_stateful_service_factory().

Required Methods§

Source

fn create_replica( &self, servicetypename: WString, servicename: Uri, initializationdata: &[u8], partitionid: GUID, replicaid: i64, ) -> Result<Box<dyn IStatefulServiceReplica>>

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

Implementors§