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>,
add_columns: Option<Vec<Field>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn commit<'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;
}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>,
add_columns: Option<Vec<Field>>,
) -> Pin<Box<dyn Future<Output = Result<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>,
add_columns: Option<Vec<Field>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return serialized commit metadata to be passed to commit.
Sourcefn commit<'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<'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 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.