SinglePhaseCommitCoordinator

Trait SinglePhaseCommitCoordinator 

Source
pub trait SinglePhaseCommitCoordinator {
    // Required methods
    fn init<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn commit_data<'life0, 'async_trait>(
        &'life0 mut self,
        epoch: u64,
        metadata: Vec<SinkMetadata>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn commit_schema_change<'life0, 'async_trait>(
        &'life0 mut self,
        _epoch: u64,
        _schema_change: PbSinkSchemaChange,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

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

Initialize the sink committer coordinator.

Source

fn commit_data<'life0, 'async_trait>( &'life0 mut self, epoch: u64, metadata: Vec<SinkMetadata>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Commit data directly using single-phase strategy.

Provided Methods§

Source

fn commit_schema_change<'life0, 'async_trait>( &'life0 mut self, _epoch: u64, _schema_change: PbSinkSchemaChange, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Idempotent implementation is required, because commit_schema_change in the same epoch could be called multiple times.

Implementors§