org.apache.ignite.internal.processors.platform.transactions

## Class PlatformTransactions

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.PlatformAbstractTarget
  - - org.apache.ignite.internal.processors.platform.transactions.PlatformTransactions

All Implemented Interfaces:
  PlatformTarget

    public class PlatformTransactions
    extends PlatformAbstractTarget

Native transaction wrapper implementation.

### Field Summary

Fields
`static int` `OP_CACHE_CONFIG_PARAMETERS`
`static int` `OP_METRICS`

### Fields inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`FALSE, log, platformCtx, TRUE`

### Constructor Summary

Constructors
Constructor and Description
`PlatformTransactions(PlatformContext platformCtx)` Constructor.

### Method Summary

Methods
`protected void` `processOutStream(int type, BinaryRawWriterEx writer)` Process OUT operation.
`void` `resetMetrics()` Resets transaction metrics.
`int` `txClose(long id)`
`int` `txCommit(long id)`
`void` `txCommitAsync(long txId, long futId)` Commits tx in async mode.
`int` `txRollback(long id)`
`void` `txRollbackAsync(long txId, long futId)` Rolls back tx in async mode.
`boolean` `txSetRollbackOnly(long id)`
`long` `txStart(int concurrency, int isolation, long timeout, int txSize)`
`int` `txState(long id)`

### Methods inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`convertException, currentFuture, currentFutureWrapped, futureWriter, inObjectStreamOutStream, inStreamOutLong, inStreamOutObject, inStreamOutStream, listenFuture, listenFutureForOperation, outLong, outObject, outStream, platformContext, processInObjectStreamOutStream, processInStreamOutLong, processInStreamOutObject, processInStreamOutStream, processOutLong, processOutObject, throwUnsupported`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### OP_CACHE_CONFIG_PARAMETERS

    public static final int OP_CACHE_CONFIG_PARAMETERS

See Also:
  Constant Field Values

#### OP_METRICS

    public static final int OP_METRICS

See Also:
  Constant Field Values

### Constructor Detail

#### PlatformTransactions

    public PlatformTransactions(PlatformContext platformCtx)

Constructor.

Parameters:
  `platformCtx` - Context.

### Method Detail

#### txStart

    public long txStart(int concurrency,
               int isolation,
               long timeout,
               int txSize)

Parameters:
  `concurrency` - Concurrency.
  `isolation` - Isolation.
  `timeout` - Timeout
  `txSize` - Number of entries participating in transaction.
Returns:
  Transaction thread ID.

#### txCommit

    public int txCommit(long id)
                 throws IgniteCheckedException

Parameters:
  `id` - Transaction ID.
Throws:
  `IgniteCheckedException` - In case of error.

#### txRollback

    public int txRollback(long id)
                   throws IgniteCheckedException

Parameters:
  `id` - Transaction ID.
Throws:
  `IgniteCheckedException` - In case of error.

#### txClose

    public int txClose(long id)
                throws IgniteCheckedException

Parameters:
  `id` - Transaction ID.
Returns:
  Transaction state.
Throws:
  `IgniteCheckedException` - In case of error.

#### txState

    public int txState(long id)

Parameters:
  `id` - Transaction ID.
Returns:
  Transaction state.

#### txSetRollbackOnly

    public boolean txSetRollbackOnly(long id)

Parameters:
  `id` - Transaction ID.
Returns:
  `True` if rollback only flag was set.

#### txCommitAsync

    public void txCommitAsync(long txId,
                     long futId)

Commits tx in async mode.

#### txRollbackAsync

    public void txRollbackAsync(long txId,
                       long futId)

Rolls back tx in async mode.

#### resetMetrics

    public void resetMetrics()

Resets transaction metrics.

#### processOutStream

    protected void processOutStream(int type,
                        BinaryRawWriterEx writer)
                             throws IgniteCheckedException

Process OUT operation.

Overrides:
  `processOutStream` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `writer` - Portable writer.
Throws:
  `IgniteCheckedException` - In case of exception.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015