pub trait TwoPhaseCommitCoordinator {
// 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 pre_commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
schema_change: Option<PbSinkSchemaChange>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn commit_data<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
commit_metadata: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn abort<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
commit_metadata: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + 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§
Sourcefn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.
Sourcefn pre_commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
schema_change: Option<PbSinkSchemaChange>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pre_commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
schema_change: Option<PbSinkSchemaChange>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return serialized commit metadata to be passed to commit.
Sourcefn commit_data<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
commit_metadata: Vec<u8>,
) -> 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,
commit_metadata: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Idempotent implementation is required, because commit_data in the same epoch could be called multiple times.
Sourcefn abort<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
commit_metadata: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn abort<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
commit_metadata: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Idempotent implementation is required, because abort in the same epoch could be called multiple times.
Provided Methods§
Sourcefn 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,
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.