Skip to main content

ISelfReconfiguringServiceInstance

Trait ISelfReconfiguringServiceInstance 

Source
pub trait ISelfReconfiguringServiceInstance:
    Send
    + Sync
    + 'static {
    // Required methods
    fn open<'life0, 'async_trait>(
        &'life0 self,
        partition: Arc<dyn ISelfReconfiguringServicePartition>,
        open_mode: SelfReconfiguringOpenMode,
        cancellation_token: BoxedCancelToken,
    ) -> Pin<Box<dyn Future<Output = Result<WString>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn request_configuration(
        &self,
        request: SelfReconfiguringConfigurationRequest,
    ) -> Result<()>;
    fn request_configuration_change(
        &self,
        change: SelfReconfiguringConfigurationChangeRequest,
    ) -> Result<()>;
    fn close<'life0, 'async_trait>(
        &'life0 self,
        cancellation_token: BoxedCancelToken,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn abort(&self);
}
Expand description

Safe abstraction over the IFabricSelfReconfiguringServiceInstance COM interface that an author implements. Each method corresponds to a method on that COM interface; open and close are asynchronous (COM Begin/End), the rest are synchronous.

Required Methods§

Source

fn open<'life0, 'async_trait>( &'life0 self, partition: Arc<dyn ISelfReconfiguringServicePartition>, open_mode: SelfReconfiguringOpenMode, cancellation_token: BoxedCancelToken, ) -> Pin<Box<dyn Future<Output = Result<WString>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Opens an initialized service instance. The returned string is the address of this service instance, which is associated with the service name via Service Fabric naming and returned to clients that resolve the service.

open_mode is the open mode supplied by Service Fabric.

Source

fn request_configuration( &self, request: SelfReconfiguringConfigurationRequest, ) -> Result<()>

Public documentation for this interface is TBD.

Source

fn request_configuration_change( &self, change: SelfReconfiguringConfigurationChangeRequest, ) -> Result<()>

Public documentation for this interface is TBD.

Source

fn close<'life0, 'async_trait>( &'life0 self, cancellation_token: BoxedCancelToken, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Closes this service instance gracefully when the service instance is being shut down.

Source

fn abort(&self)

Terminates this instance ungracefully with this synchronous method call. When the service instance receives this method, it should immediately release and clean up all references and return.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§