org.apache.ignite.internal.processors.cache.distributed

## Class GridDistributedTxMapping

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping

    public class GridDistributedTxMapping
    extends Object

Transaction node mapping.

### Constructor Summary

Constructors
Constructor and Description
`GridDistributedTxMapping(ClusterNode primary)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(IgniteTxEntry entry)`
`void` `addBackups(Collection<UUID> newBackups)`
`Set<UUID>` `backups()`
`boolean` `clientFirst()`
`void` `clientFirst(boolean clientFirst)`
`Collection<IgniteTxEntry>` `colocatedEntriesReads()`
`Collection<IgniteTxEntry>` `colocatedEntriesWrites()`
`GridCacheVersion` `dhtVersion()`
`void` `dhtVersion(GridCacheVersion dhtVer, GridCacheVersion writeVer)`
`boolean` `empty()` Whether empty or not.
`Collection<IgniteTxEntry>` `entries()`
`void` `evictReaders(@Nullable Collection<IgniteTxKey> keys)`
`boolean` `explicitLock()`
`boolean` `hasColocatedCacheEntries()`
`boolean` `hasNearCacheEntries()`
`boolean` `last()`
`void` `last(boolean last)`
`void` `markExplicitLock()` Sets explicit flag to `true`.
`void` `markQueryUpdate()` Sets query update flag to `true`.
`@Nullable Collection<IgniteTxEntry>` `nearCacheEntries()`
`Collection<IgniteTxEntry>` `nearEntriesReads()`
`Collection<IgniteTxEntry>` `nearEntriesWrites()`
`ClusterNode` `primary()`
`boolean` `queryUpdate()`
`Collection<IgniteTxEntry>` `reads()`
`boolean` `removeEntry(IgniteTxEntry entry)`
`String` `toString()`
`Collection<IgniteTxEntry>` `writes()`

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

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

### Constructor Detail

#### GridDistributedTxMapping

    public GridDistributedTxMapping(ClusterNode primary)

Parameters:
  `primary` - Primary node.

### Method Detail

#### last

    public boolean last()

Returns:
  `True` if this is last mapping for node.

#### last

    public void last(boolean last)

Parameters:
  `last` - If `True` this is last mapping for node.

#### clientFirst

    public boolean clientFirst()

Returns:
  `True` if this is first mapping for optimistic tx on client node.

#### clientFirst

    public void clientFirst(boolean clientFirst)

Parameters:
  `clientFirst` - `True` if this is first mapping for optimistic tx on client node.

#### hasColocatedCacheEntries

    public boolean hasColocatedCacheEntries()

Returns:
  `True` if has colocated cache entries.

#### hasNearCacheEntries

    public boolean hasNearCacheEntries()

Returns:
  `True` if has near cache entries.

#### primary

    public ClusterNode primary()

Returns:
  Node.

#### entries

    public Collection<IgniteTxEntry> entries()

Returns:
  Entries.

#### nearCacheEntries

    @Nullable
    public @Nullable Collection<IgniteTxEntry> nearCacheEntries()

Returns:
  Near cache entries.

#### queryUpdate

    public boolean queryUpdate()

Returns:
  `True` if mapping was created for a query update.

#### markQueryUpdate

    public void markQueryUpdate()

Sets query update flag to `true`.

#### explicitLock

    public boolean explicitLock()

Returns:
  `True` if lock is explicit.

#### markExplicitLock

    public void markExplicitLock()

Sets explicit flag to `true`.

#### dhtVersion

    public GridCacheVersion dhtVersion()

Returns:
  DHT version.

#### dhtVersion

    public void dhtVersion(GridCacheVersion dhtVer,
                           GridCacheVersion writeVer)

Parameters:
  `dhtVer` - DHT version.
  `writeVer` - DHT writeVersion.

#### reads

    public Collection<IgniteTxEntry> reads()

Returns:
  Reads.

#### writes

    public Collection<IgniteTxEntry> writes()

Returns:
  Writes.

#### nearEntriesReads

    public Collection<IgniteTxEntry> nearEntriesReads()

Returns:
  Near cache reads.

#### nearEntriesWrites

    public Collection<IgniteTxEntry> nearEntriesWrites()

Returns:
  Near cache writes.

#### colocatedEntriesReads

    public Collection<IgniteTxEntry> colocatedEntriesReads()

Returns:
  Colocated cache reads.

#### colocatedEntriesWrites

    public Collection<IgniteTxEntry> colocatedEntriesWrites()

Returns:
  Colocated cache writes.

#### add

    public void add(IgniteTxEntry entry)

Parameters:
  `entry` - Adds entry.

#### removeEntry

    public boolean removeEntry(IgniteTxEntry entry)

Parameters:
  `entry` - Entry to remove.
Returns:
  `True` if entry was removed.

#### evictReaders

    public void evictReaders(@Nullable
                             @Nullable Collection<IgniteTxKey> keys)

Parameters:
  `keys` - Keys to evict readers for.

#### empty

    public boolean empty()

Whether empty or not.

Returns:
  Empty or not.

#### addBackups

    public void addBackups(Collection<UUID> newBackups)

Parameters:
  `newBackups` - Backups to be added to this mapping.

#### backups

    public Set<UUID> backups()

Returns:
  Mapped backup nodes.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021