pub struct ListTransactionsOptions { /* private fields */ }Expand description
Options for Admin::list_transactions.
Implementations§
Source§impl ListTransactionsOptions
impl ListTransactionsOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates default options: no filters, and filtered_duration_ms == -1
(no duration filtering), matching Java’s defaults.
Sourcepub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
pub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self
Sourcepub fn timeout_ms(&self) -> Option<i32>
pub fn timeout_ms(&self) -> Option<i32>
Returns the timeout in milliseconds for this operation, or None if the
default API timeout for the AdminClient should be used.
Sourcepub fn filter_states(
self,
states: impl IntoIterator<Item = TransactionState>,
) -> Self
pub fn filter_states( self, states: impl IntoIterator<Item = TransactionState>, ) -> Self
Sourcepub fn filter_producer_ids(
self,
producer_ids: impl IntoIterator<Item = i64>,
) -> Self
pub fn filter_producer_ids( self, producer_ids: impl IntoIterator<Item = i64>, ) -> Self
Filter only the transactions from producers in a specific set of producer ids. If no filter is specified or if the passed collection of producer ids is empty, then the transactions of all producer ids will be returned.
§Arguments
producer_ids- the set of producer ids to filter by
§Returns
This ListTransactionsOptions instance.
Sourcepub fn filter_on_duration(self, duration_ms: i64) -> Self
pub fn filter_on_duration(self, duration_ms: i64) -> Self
Filter only the transactions that are running longer than the specified duration. If no filter is specified or if the passed duration ms is less than 0, then the all transactions will be returned.
§Arguments
duration_ms- the duration in milliseconds to filter by
§Returns
This ListTransactionsOptions instance.
Sourcepub fn filter_on_transactional_id_pattern(self, pattern: Option<String>) -> Self
pub fn filter_on_transactional_id_pattern(self, pattern: Option<String>) -> Self
Filter only the transactions that match with the given transactional ID pattern. If the
filter is None or if the passed string is empty, then all the transactions will be
returned.
§Arguments
pattern- the transactional ID regular expression pattern to filter by
§Returns
This ListTransactionsOptions instance.
Sourcepub fn filtered_states(&self) -> &HashSet<TransactionState>
pub fn filtered_states(&self) -> &HashSet<TransactionState>
Returns the set of states to be filtered or empty if no states have been specified.
§Returns
the current set of filtered states (empty means that no states are filtered and all transactions will be returned)
Sourcepub fn filtered_producer_ids(&self) -> &HashSet<i64>
pub fn filtered_producer_ids(&self) -> &HashSet<i64>
Returns the set of producer ids that are being filtered or empty if none have been specified.
§Returns
the current set of filtered producer ids (empty means that no producer ids are filtered and all transactions will be returned)
Sourcepub fn filtered_duration(&self) -> i64
pub fn filtered_duration(&self) -> i64
Returns the duration ms value being filtered.
§Returns
the current duration filter value in ms (negative value means transactions are not filtered by duration)
Sourcepub fn filtered_transactional_id_pattern(&self) -> Option<&str>
pub fn filtered_transactional_id_pattern(&self) -> Option<&str>
Returns transactional ID being filtered.
§Returns
the current transactional ID pattern filter (empty means no transactional IDs are filtered and all transactions will be returned)
Trait Implementations§
Source§impl Clone for ListTransactionsOptions
impl Clone for ListTransactionsOptions
Source§fn clone(&self) -> ListTransactionsOptions
fn clone(&self) -> ListTransactionsOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ListTransactionsOptions
impl Debug for ListTransactionsOptions
Source§impl Default for ListTransactionsOptions
Java’s new ListTransactionsOptions(); a derived Default would set
filtered_duration_ms to 0 instead of Java’s -1L (the initializer of
ListTransactionsOptions#filteredDuration), and Admin::list_transactions()
uses it.
impl Default for ListTransactionsOptions
Java’s new ListTransactionsOptions(); a derived Default would set
filtered_duration_ms to 0 instead of Java’s -1L (the initializer of
ListTransactionsOptions#filteredDuration), and Admin::list_transactions()
uses it.
Source§impl Display for ListTransactionsOptions
impl Display for ListTransactionsOptions
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Java’s toString(), the sets as Java’s [a, b] and an unset timeout or
pattern as null.
Java prints its HashSets in hash order. That order is unspecified for
the states, since an enum’s hash is its identity hash, so they print in
declaration order. The producer ids print in ascending order, which is
Java’s order for non-negative ids below the table size.
Source§impl Hash for ListTransactionsOptions
impl Hash for ListTransactionsOptions
Source§impl PartialEq for ListTransactionsOptions
impl PartialEq for ListTransactionsOptions
impl Eq for ListTransactionsOptions
Auto Trait Implementations§
impl Freeze for ListTransactionsOptions
impl RefUnwindSafe for ListTransactionsOptions
impl Send for ListTransactionsOptions
impl Sync for ListTransactionsOptions
impl Unpin for ListTransactionsOptions
impl UnsafeUnpin for ListTransactionsOptions
impl UnwindSafe for ListTransactionsOptions
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
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
§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
key and return true if they are equal.