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

## Class IgniteTxRemoteStateImpl

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

All Implemented Interfaces:
  IgniteTxRemoteState, IgniteTxState

    public class IgniteTxRemoteStateImpl
    extends IgniteTxRemoteStateAdapter

### Field Summary

Fields
`protected Map<IgniteTxKey,IgniteTxEntry>` `readMap` Read set.
`protected Map<IgniteTxKey,IgniteTxEntry>` `writeMap` Write map.

### Fields inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxRemoteStateAdapter

`mvccEnabled`

### Constructor Summary

Constructors
Constructor and Description
`IgniteTxRemoteStateImpl(Map<IgniteTxKey,IgniteTxEntry> readMap, Map<IgniteTxKey,IgniteTxEntry> writeMap)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addWriteEntry(IgniteTxKey key, IgniteTxEntry e)`
`Collection<IgniteTxEntry>` `allEntries()`
`void` `clearEntry(IgniteTxKey key)`
`boolean` `empty()`
`IgniteTxEntry` `entry(IgniteTxKey key)`
`boolean` `hasWriteKey(IgniteTxKey key)`
`void` `invalidPartition(int cacheId, int part, GridCacheVersion version)`
`Collection<IgniteTxEntry>` `readEntries()`
`Map<IgniteTxKey,IgniteTxEntry>` `readMap()`
`Set<IgniteTxKey>` `readSet()`
`IgniteTxEntry` `singleWrite()`
`Collection<CacheStoreManager>` `stores(GridCacheSharedContext cctx)`
`String` `toString()`
`void` `unwindEvicts(GridCacheSharedContext cctx)` Unwind evicts for caches involved in this transaction.
`Collection<IgniteTxEntry>` `writeEntries()`
`Map<IgniteTxKey,IgniteTxEntry>` `writeMap()`
`Set<IgniteTxKey>` `writeSet()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.transactions.IgniteTxRemoteStateAdapter

`addActiveCache, awaitLastFuture, cacheIds, firstCacheId, hasInterceptor, implicitSingle, mvccEnabled, onTxEnd, singleCacheContext, storeWriteThrough, syncMode, topologyReadLock, topologyReadUnlock, useMvccCaching, validateTopology`

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

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

### Field Detail

#### readMap

    @GridToStringInclude
    protected Map<IgniteTxKey,IgniteTxEntry> readMap

Read set.

#### writeMap

    @GridToStringInclude
    protected Map<IgniteTxKey,IgniteTxEntry> writeMap

Write map.

### Constructor Detail

#### IgniteTxRemoteStateImpl

    public IgniteTxRemoteStateImpl(Map<IgniteTxKey,IgniteTxEntry> readMap,
                                   Map<IgniteTxKey,IgniteTxEntry> writeMap)

Parameters:
  `readMap` - Read map.
  `writeMap` - Write map.

### Method Detail

#### unwindEvicts

    public void unwindEvicts(GridCacheSharedContext cctx)

Unwind evicts for caches involved in this transaction.

Parameters:
  `cctx` - Grid cache shared context.

#### entry

    public IgniteTxEntry entry(IgniteTxKey key)

Parameters:
  `key` - Key.
Returns:
  Entry.

#### hasWriteKey

    public boolean hasWriteKey(IgniteTxKey key)

Parameters:
  `key` - Key.
Returns:
  `True` if tx has write key.

#### readSet

    public Set<IgniteTxKey> readSet()

Returns:
  Read entries keys.

#### writeSet

    public Set<IgniteTxKey> writeSet()

Returns:
  Write entries keys.

#### writeEntries

    public Collection<IgniteTxEntry> writeEntries()

Returns:
  Write entries.

#### readEntries

    public Collection<IgniteTxEntry> readEntries()

Returns:
  Read entries.

#### writeMap

    public Map<IgniteTxKey,IgniteTxEntry> writeMap()

Returns:
  Write entries map.

#### readMap

    public Map<IgniteTxKey,IgniteTxEntry> readMap()

Returns:
  Read entries map.

#### empty

    public boolean empty()

Returns:
  `True` if transaction is empty.

#### addWriteEntry

    public void addWriteEntry(IgniteTxKey key,
                              IgniteTxEntry e)

Parameters:
  `key` - Key.
  `e` - Entry.

#### clearEntry

    public void clearEntry(IgniteTxKey key)

Parameters:
  `key` - Entry key.

#### allEntries

    public Collection<IgniteTxEntry> allEntries()

Returns:
  All entries.

#### singleWrite

    public IgniteTxEntry singleWrite()

Returns:
  Non-null entry if tx has only one write entry.

#### invalidPartition

    public void invalidPartition(int cacheId,
                                 int part,
                                 GridCacheVersion version)

Parameters:
  `cacheId` - Cache id.
  `part` - Partition number.
  `version` - Lock version.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### stores

    public Collection<CacheStoreManager> stores(GridCacheSharedContext cctx)

Parameters:
  `cctx` - Context.
Returns:
  Configured stores for active caches.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021