mssf_core::runtime::stateful

Trait StatefulServiceFactory

source
pub trait StatefulServiceFactory {
    // Required method
    fn create_replica(
        &self,
        servicetypename: &HSTRING,
        servicename: &HSTRING,
        initializationdata: &[u8],
        partitionid: &GUID,
        replicaid: i64,
    ) -> Result<impl StatefulServiceReplica>;
}
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: &HSTRING, servicename: &HSTRING, initializationdata: &[u8], partitionid: &GUID, replicaid: i64, ) -> Result<impl StatefulServiceReplica>

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

Object Safety§

This trait is not object safe.

Implementors§