pub struct TransactionDescription { /* private fields */ }Expand description
The description of a transaction.
Implementations§
Source§impl TransactionDescription
impl TransactionDescription
Sourcepub fn new(
coordinator_id: i32,
state: TransactionState,
producer_id: i64,
producer_epoch: i32,
transaction_timeout_ms: i64,
transaction_start_time_ms: Option<i64>,
topic_partitions: HashSet<TopicPartition>,
) -> Self
pub fn new( coordinator_id: i32, state: TransactionState, producer_id: i64, producer_epoch: i32, transaction_timeout_ms: i64, transaction_start_time_ms: Option<i64>, topic_partitions: HashSet<TopicPartition>, ) -> Self
Creates a new TransactionDescription.
§Arguments
coordinator_id- the id of the coordinator that owns this transaction.state- the current state of the transaction.producer_id- the producer id of the transaction.producer_epoch- the producer epoch of the transaction.transaction_timeout_ms- the transaction timeout in milliseconds.transaction_start_time_ms- the start time of the transaction in milliseconds, orNoneif no transaction is in progress.topic_partitions- the partitions included in the transaction.
Sourcepub fn coordinator_id(&self) -> i32
pub fn coordinator_id(&self) -> i32
Returns the id of the coordinator that owns this transaction.
Sourcepub fn state(&self) -> TransactionState
pub fn state(&self) -> TransactionState
Returns the current state of the transaction.
Sourcepub fn producer_id(&self) -> i64
pub fn producer_id(&self) -> i64
Returns the producer id of the transaction.
Sourcepub fn producer_epoch(&self) -> i32
pub fn producer_epoch(&self) -> i32
Returns the producer epoch of the transaction.
Sourcepub fn transaction_timeout_ms(&self) -> i64
pub fn transaction_timeout_ms(&self) -> i64
Returns the transaction timeout in milliseconds.
Sourcepub fn transaction_start_time_ms(&self) -> Option<i64>
pub fn transaction_start_time_ms(&self) -> Option<i64>
Returns the transaction start time in milliseconds, if a transaction is in progress.
Sourcepub fn topic_partitions(&self) -> &HashSet<TopicPartition>
pub fn topic_partitions(&self) -> &HashSet<TopicPartition>
Returns the set of topic partitions that have been added to the transaction.
Trait Implementations§
Source§impl Clone for TransactionDescription
impl Clone for TransactionDescription
Source§fn clone(&self) -> TransactionDescription
fn clone(&self) -> TransactionDescription
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionDescription
impl Debug for TransactionDescription
Source§impl Display for TransactionDescription
impl Display for TransactionDescription
Source§impl Hash for TransactionDescription
impl Hash for TransactionDescription
Source§impl PartialEq for TransactionDescription
impl PartialEq for TransactionDescription
impl Eq for TransactionDescription
impl StructuralPartialEq for TransactionDescription
Auto Trait Implementations§
impl Freeze for TransactionDescription
impl RefUnwindSafe for TransactionDescription
impl Send for TransactionDescription
impl Sync for TransactionDescription
impl Unpin for TransactionDescription
impl UnsafeUnpin for TransactionDescription
impl UnwindSafe for TransactionDescription
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more