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

## Class IgniteTxRemoteStateAdapter

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

All Implemented Interfaces:
  IgniteTxRemoteState, IgniteTxState

Direct Known Subclasses:
  IgniteTxRemoteSingleStateImpl, IgniteTxRemoteStateImpl

    public abstract class IgniteTxRemoteStateAdapter
    extends Object
    implements IgniteTxRemoteState

### Constructor Summary

Constructors
Constructor and Description
`IgniteTxRemoteStateAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addActiveCache(GridCacheContext cctx, boolean recovery, IgniteTxAdapter tx)`
`void` `awaitLastFuture(GridCacheSharedContext cctx)`
`GridIntList` `cacheIds()` Gets caches ids affected with current tx.
`Integer` `firstCacheId()`
`boolean` `hasInterceptor(GridCacheSharedContext cctx)`
`boolean` `implicitSingle()`
`void` `onTxEnd(GridCacheSharedContext cctx, IgniteInternalTx tx, boolean commit)`
`GridCacheContext` `singleCacheContext(GridCacheSharedContext cctx)`
`boolean` `storeWriteThrough(GridCacheSharedContext cctx)`
`CacheWriteSynchronizationMode` `syncMode(GridCacheSharedContext cctx)`
`GridDhtTopologyFuture` `topologyReadLock(GridCacheSharedContext cctx, GridFutureAdapter<?> fut)`
`void` `topologyReadUnlock(GridCacheSharedContext cctx)`
`IgniteCheckedException` `validateTopology(GridCacheSharedContext cctx, boolean read, GridDhtTopologyFuture topFut)`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteTxRemoteState

`addWriteEntry, clearEntry, invalidPartition`

### Methods inherited from interface org.apache.ignite.internal.processors.cache.transactions.IgniteTxState

`allEntries, empty, entry, hasWriteKey, mvccEnabled, readEntries, readMap, readSet, singleWrite, stores, unwindEvicts, writeEntries, writeMap, writeSet`

### Constructor Detail

#### IgniteTxRemoteStateAdapter

    public IgniteTxRemoteStateAdapter()

### Method Detail

#### implicitSingle

    public boolean implicitSingle()

Specified by:
  `implicitSingle` in interface `IgniteTxState`
Returns:
  Flag indicating whether transaction is implicit with only one key.

#### firstCacheId

    @Nullable
    public Integer firstCacheId()

Specified by:
  `firstCacheId` in interface `IgniteTxState`
Returns:
  First tx cache id.

#### cacheIds

    @Nullable
    public GridIntList cacheIds()

Gets caches ids affected with current tx.

Specified by:
  `cacheIds` in interface `IgniteTxState`
Returns:
  tx cache ids.

#### awaitLastFuture

    public void awaitLastFuture(GridCacheSharedContext cctx)

Specified by:
  `awaitLastFuture` in interface `IgniteTxState`
Parameters:
  `cctx` - Awaits for previous async operations on active caches to be completed.

#### validateTopology

    public IgniteCheckedException validateTopology(GridCacheSharedContext cctx,
                                                   boolean read,
                                                   GridDhtTopologyFuture topFut)

Specified by:
  `validateTopology` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
  `read` - `True` if validating for a read operation, `false` for write.
  `topFut` - Topology future.
Returns:
  Error if validation failed.

#### syncMode

    public CacheWriteSynchronizationMode syncMode(GridCacheSharedContext cctx)

Specified by:
  `syncMode` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
Returns:
  Write synchronization mode.

#### addActiveCache

    public void addActiveCache(GridCacheContext cctx,
                               boolean recovery,
                               IgniteTxAdapter tx)
                        throws IgniteCheckedException

Specified by:
  `addActiveCache` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
  `tx` - Transaction.
Throws:
  `IgniteCheckedException` - If cache check failed.

#### topologyReadLock

    public GridDhtTopologyFuture topologyReadLock(GridCacheSharedContext cctx,
                                                  GridFutureAdapter<?> fut)

Specified by:
  `topologyReadLock` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
  `fut` - Future to finish with error if some cache is stopping.
Returns:
  Topology future.

#### topologyReadUnlock

    public void topologyReadUnlock(GridCacheSharedContext cctx)

Specified by:
  `topologyReadUnlock` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.

#### storeWriteThrough

    public boolean storeWriteThrough(GridCacheSharedContext cctx)

Specified by:
  `storeWriteThrough` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
Returns:
  `True` if transaction is allowed to use store and transactions spans one or more caches with store enabled.

#### hasInterceptor

    public boolean hasInterceptor(GridCacheSharedContext cctx)

Specified by:
  `hasInterceptor` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
Returns:
  `True` if transaction spans one or more caches with configured interceptor.

#### singleCacheContext

    @Nullable
    public GridCacheContext singleCacheContext(GridCacheSharedContext cctx)

Specified by:
  `singleCacheContext` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
Returns:
  cctx Non-null cache context if tx has only one active cache.

#### onTxEnd

    public void onTxEnd(GridCacheSharedContext cctx,
                        IgniteInternalTx tx,
                        boolean commit)

Specified by:
  `onTxEnd` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
  `tx` - Transaction.
  `commit` - Commit flag.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018