Trait dist_tx::rm::ResourceManager
source · pub trait ResourceManager {
Show 14 methods
fn start(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn start_by_joining(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn start_by_resuming(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn end_success(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn end_failure(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn end_suspend(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn prepare(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn commit(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn commit_one_phase(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn rollback(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn forget(&mut self, id: &XaTransactionId) -> RmResult<RmRc>;
fn recover(&mut self) -> RmResult<Vec<XaTransactionId>>;
fn begin_recover(&mut self) -> RmResult<Vec<XaTransactionId>>;
fn end_recover(&mut self) -> RmResult<Vec<XaTransactionId>>;
}
Expand description
Interface of a resource manager, as required by a transaction manager.
Required Methods
sourcefn start(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn start(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to start work on behalf of the given transaction branch.
sourcefn start_by_joining(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn start_by_joining(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to join working on behalf of the given transaction branch.
sourcefn start_by_resuming(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn start_by_resuming(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to resume working on behalf of the given transaction branch.
sourcefn end_success(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn end_success(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to end working on behalf of the given transaction branch.
sourcefn end_failure(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn end_failure(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to stop working on behalf of the given transaction branch, transaction will not be committed.
sourcefn end_suspend(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn end_suspend(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to suspend working on behalf of the given transaction branch.
sourcefn prepare(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn prepare(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to prepare to commit the work done in the given transaction branch.
sourcefn commit(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn commit(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to commit the work done in the given prepared transaction branch.
sourcefn commit_one_phase(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn commit_one_phase(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to commit the work done in the given not-prepared transaction branch.
sourcefn rollback(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn rollback(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to rollback the work done in the given transaction branch.
sourcefn forget(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
fn forget(&mut self, id: &XaTransactionId) -> RmResult<RmRc>
Tells the server to forget about the given heuristically completed transaction.
sourcefn recover(&mut self) -> RmResult<Vec<XaTransactionId>>
fn recover(&mut self) -> RmResult<Vec<XaTransactionId>>
Returns the list of transactions that have been prepared or heuristically completed.
sourcefn begin_recover(&mut self) -> RmResult<Vec<XaTransactionId>>
fn begin_recover(&mut self) -> RmResult<Vec<XaTransactionId>>
Returns the list of transactions that have been prepared or heuristically completed.
sourcefn end_recover(&mut self) -> RmResult<Vec<XaTransactionId>>
fn end_recover(&mut self) -> RmResult<Vec<XaTransactionId>>
Returns the list of transactions that have been prepared or heuristically completed.