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

## Class IgniteTxKey<K>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey<K>

All Implemented Interfaces:
  Externalizable, Serializable

    public class IgniteTxKey<K>
    extends Object
    implements Externalizable

Cache transaction key. This wrapper is needed because same keys may be enlisted in the same transaction for multiple caches.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgniteTxKey()` Empty constructor required for `Externalizable`.
`IgniteTxKey(K key, int cacheId)`

### Method Summary

Methods
`int` `cacheId()`
`boolean` `equals(Object o)`
`int` `hashCode()`
`K` `key()`
`void` `readExternal(ObjectInput in)`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### IgniteTxKey

    public IgniteTxKey()

Empty constructor required for `Externalizable`.

#### IgniteTxKey

    public IgniteTxKey(K key,
               int cacheId)

Parameters:
  `key` - User key.
  `cacheId` - Cache ID.

### Method Detail

#### key

    public K key()

Returns:
  User key.

#### cacheId

    public int cacheId()

Returns:
  Cache ID.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### 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