Trait aptos_parallel_executor::task::ExecutorTask
source · [−]pub trait ExecutorTask: Sync {
type T: Transaction;
type Output: TransactionOutput<T = Self::T> + 'static;
type Error: Clone + Send + Sync + 'static;
type Argument: Sync + Copy;
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
type T: Transaction
type T: Transaction
Type of transaction and its associated key and value.
type Output: TransactionOutput<T = Self::T> + 'static
type Output: TransactionOutput<T = Self::T> + 'static
The output of a transaction. This should contain the side effect of this transaction.
Type of error when the executor failed to process a transaction and needs to abort.
Required Methods
fn 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.