Struct tikv_client::TransactionOptions[][src]

pub struct TransactionOptions {
    kind: TransactionKind,
    try_one_pc: bool,
    async_commit: bool,
    read_only: bool,
    retry_options: RetryOptions,
    check_level: CheckLevel,
    auto_heartbeat: bool,
}

Options for configuring a transaction.

Fields

kind: TransactionKind

Optimistic or pessimistic (default) transaction.

try_one_pc: bool

Try using 1pc rather than 2pc (default is to always use 2pc).

async_commit: bool

Try to use async commit (default is not to).

read_only: bool

Is the transaction read only? (Default is no).

retry_options: RetryOptions

How to retry in the event of certain errors.

check_level: CheckLevel

What to do if the transaction is dropped without an attempt to commit or rollback

auto_heartbeat: bool

Whether heartbeat will be sent automatically

Implementations

impl TransactionOptions[src]

pub fn new_optimistic() -> TransactionOptions[src]

Default options for an optimistic transaction.

pub fn new_pessimistic() -> TransactionOptions[src]

Default options for a pessimistic transaction.

pub fn use_async_commit(self) -> TransactionOptions[src]

Try to use async commit.

pub fn try_one_pc(self) -> TransactionOptions[src]

Try to use 1pc.

pub fn read_only(self) -> TransactionOptions[src]

Make the transaction read only.

pub fn no_resolve_locks(self) -> TransactionOptions[src]

Don’t automatically resolve locks and retry if keys are locked.

pub fn no_resolve_regions(self) -> TransactionOptions[src]

Don’t automatically resolve regions with PD if we have outdated region information.

pub fn retry_options(self, options: RetryOptions) -> TransactionOptions[src]

Set RetryOptions.

pub fn drop_check(self, level: CheckLevel) -> TransactionOptions[src]

Set the behavior when dropping a transaction without an attempt to commit or rollback it.

fn push_for_update_ts(&mut self, for_update_ts: Timestamp)[src]

pub fn no_auto_hearbeat(self) -> TransactionOptions[src]

Trait Implementations

impl Clone for TransactionOptions[src]

impl Debug for TransactionOptions[src]

impl Default for TransactionOptions[src]

impl PartialEq<TransactionOptions> for TransactionOptions[src]

impl StructuralPartialEq for TransactionOptions[src]

Auto Trait Implementations

impl RefUnwindSafe for TransactionOptions

impl Send for TransactionOptions

impl Sync for TransactionOptions

impl Unpin for TransactionOptions

impl UnwindSafe for TransactionOptions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]