Package oracle.kv.txn

# Class TransactionIdImpl

java.lang.Object
oracle.kv.txn.TransactionIdImpl

All Implemented Interfaces:
  `TransactionId`

public class TransactionIdImpl extends Object implements TransactionId
Object that represents a transaction id. The transaction id is a unique id associated with a particular transaction.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransactionIdImpl(int shardId, long txnId, long timestamp)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getShardId()`
  Returns id of shard where the transaction is performed
  `long`
  `getShardTxnId()`
  Returns the internal transaction id generated by JE environment.
  `long`
  `getTimestamp()`
  `UUID`
  `getUuid()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### TransactionIdImpl

    public TransactionIdImpl(int shardId, long txnId, long timestamp)

- ## Method Details

  - ### getShardId

    public int getShardId()
    Returns id of shard where the transaction is performed
    Specified by:
      `getShardId` in interface `TransactionId`
    Returns:
      shard id

  - ### getShardTxnId

    public long getShardTxnId()
    Returns the internal transaction id generated by JE environment. The id is shard-wide unique and
    Specified by:
      `getShardTxnId` in interface `TransactionId`
    Returns:
      the internal transaction id

  - ### getTimestamp

    public long getTimestamp()
    Specified by:
      `getTimestamp` in interface `TransactionId`
    Returns:
      the timestamp of the transaction, which is from the entry of commit (abort) for committed (aborted) transaction.

  - ### getUuid

    public UUID getUuid()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`