pub struct Transaction {
pub id: TransactionId,
pub state: Arc<RwLock<TransactionState>>,
pub operations: Arc<RwLock<Vec<TransactionOp>>>,
pub participants: Arc<RwLock<HashSet<ShardId>>>,
pub votes: Arc<DashMap<ShardId, Vote>>,
pub start_time: Instant,
pub completion_tx: Option<Sender<Result<()>>>,
pub is_read_only: bool,
pub is_single_shard: bool,
}Expand description
Individual transaction
Fields§
§id: TransactionIdTransaction ID
state: Arc<RwLock<TransactionState>>Current state
operations: Arc<RwLock<Vec<TransactionOp>>>Operations in the transaction
participants: Arc<RwLock<HashSet<ShardId>>>Participating shards
votes: Arc<DashMap<ShardId, Vote>>Participant votes
start_time: InstantStart time
completion_tx: Option<Sender<Result<()>>>Completion channel
is_read_only: boolRead-only flag
is_single_shard: boolSingle-shard flag
Auto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more