Search Results for

Show / Hide Table of Contents

# Namespace Apache.Ignite.Core.Client.Transactions

### Classes

#### TransactionClientConfiguration

Thin client transactions configuration. Default values specified here will be used by TxStart().

### Interfaces

#### ITransactionClient

Thin client transaction.

#### ITransactionsClient

Ignite Thin Client transactions facade.

Transactions are bound to the thread started the transaction. After that, each cache operation within this thread will belong to the corresponding transaction until the transaction is committed, rolled back or closed.

Should not be used with async calls. You can use cache transactions as follows:

    using (var tx = igniteClient.GetTransactions().TxStart())
    {
        int v1 = cache<string, int>.Get("k1");

        // Check if v1 satisfies some condition before doing a put.
        if (v1 > 0)
            cache.Put<string, int>("k1", 2);

        cache.Remove("k2");

        // Commit the transaction.
        tx.Commit();
    }

Alternatively, can be used to start Ignite transactions.

    using (var ts = new TransactionScope())
    {
        int v1 = cache<string, int>.Get("k1");

        // Check if v1 satisfies some condition before doing a put.
        if (v1 > 0)
            cache.Put<string, int>("k1", 2);

        cache.Remove("k2");

        // Commit the transaction.
        ts.Complete();
    }