Trait diem_parallel_executor::task::ExecutorTask
source · pub trait ExecutorTask: Sync {
type T: Transaction;
type Output: TransactionOutput<T = Self::T>;
type Error: Clone + Send + Sync;
type Argument: Sync + Copy;
// Required methods
fn init(args: Self::Argument) -> Self;
fn execute_transaction(
&self,
view: MVHashMapView<'_, <Self::T as Transaction>::Key, <Self::T as Transaction>::Value>,
txn: &Self::T
) -> ExecutionStatus<Self::Output, Self::Error>;
}
Expand description
Trait for single threaded transaction executor.
Required Associated Types§
sourcetype T: Transaction
type T: Transaction
Type of transaction and its associated key and value.
sourcetype Output: TransactionOutput<T = Self::T>
type Output: TransactionOutput<T = Self::T>
The output of a transaction. This should contain the side effect of this transaction.
Required Methods§
sourcefn execute_transaction(
&self,
view: MVHashMapView<'_, <Self::T as Transaction>::Key, <Self::T as Transaction>::Value>,
txn: &Self::T
) -> ExecutionStatus<Self::Output, Self::Error>
fn execute_transaction( &self, view: MVHashMapView<'_, <Self::T as Transaction>::Key, <Self::T as Transaction>::Value>, txn: &Self::T ) -> ExecutionStatus<Self::Output, Self::Error>
Execute one single transaction given the view of the current state.