Package 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
`IgniteTxRemoteStateAdapter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addActiveCache​(GridCacheContext cctx, boolean recovery, IgniteTxAdapter tx)`
`@Nullable GridIntList` `cacheIds()` Gets caches ids affected with current tx.
`@Nullable Integer` `firstCacheId()`
`boolean` `hasInterceptor​(GridCacheSharedContext cctx)`
`boolean` `implicitSingle()`
`void` `onTxEnd​(GridCacheSharedContext cctx, IgniteInternalTx tx, boolean commit)`
`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, 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 @Nullable Integer firstCacheId()

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

#### cacheIds

    @Nullable
    public @Nullable GridIntList cacheIds()

Gets caches ids affected with current tx.

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

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

#### onTxEnd

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

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