org.apache.ignite.internal.processors.cache.transactions

## Class TransactionMetricsAdapter

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.transactions.TransactionMetricsAdapter

All Implemented Interfaces:
  Externalizable, Serializable, TransactionMetrics

    public class TransactionMetricsAdapter
    extends Object
    implements TransactionMetrics, Externalizable

Tx metrics adapter.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`TransactionMetricsAdapter()`
`TransactionMetricsAdapter(TransactionMetrics m)`

### Method Summary

Methods
`long` `commitTime()` Gets last time transaction was committed.
`void` `onTxCommit()` Transaction commit callback.
`void` `onTxRollback()` Transaction rollback callback.
`void` `readExternal(ObjectInput in)`
`long` `rollbackTime()` Gets last time transaction was rollback.
`String` `toString()`
`int` `txCommits()` Gets total number of transaction commits.
`int` `txRollbacks()` Gets total number of transaction rollbacks.
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### TransactionMetricsAdapter

    public TransactionMetricsAdapter()

#### TransactionMetricsAdapter

    public TransactionMetricsAdapter(TransactionMetrics m)

Parameters:
  `m` - Transaction metrics to copy.

### Method Detail

#### commitTime

    public long commitTime()

Gets last time transaction was committed.

Specified by:
  `commitTime` in interface `TransactionMetrics`
Returns:
  Last commit time.

#### rollbackTime

    public long rollbackTime()

Gets last time transaction was rollback.

Specified by:
  `rollbackTime` in interface `TransactionMetrics`
Returns:
  Last rollback time.

#### txCommits

    public int txCommits()

Gets total number of transaction commits.

Specified by:
  `txCommits` in interface `TransactionMetrics`
Returns:
  Number of transaction commits.

#### txRollbacks

    public int txRollbacks()

Gets total number of transaction rollbacks.

Specified by:
  `txRollbacks` in interface `TransactionMetrics`
Returns:
  Number of transaction rollbacks.

#### onTxCommit

    public void onTxCommit()

Transaction commit callback.

#### onTxRollback

    public void onTxRollback()

Transaction rollback callback.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015