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

Methods
`void` `addActiveCache(GridCacheContext cacheCtx, IgniteTxLocalAdapter tx)`
`void` `awaitLastFut(GridCacheSharedContext cctx)`
`Integer` `firstCacheId()`
`boolean` `hasInterceptor(GridCacheSharedContext cctx)`
`boolean` `hasNearCache(GridCacheSharedContext cctx)`
`boolean` `implicitSingle()`
`void` `onTxEnd(GridCacheSharedContext cctx, IgniteInternalTx tx, boolean commit)`
`GridCacheContext` `singleCacheContext(GridCacheSharedContext cctx)`
`boolean` `storeUsed(GridCacheSharedContext cctx)`
`CacheWriteSynchronizationMode` `syncMode(GridCacheSharedContext cctx)`
`GridDhtTopologyFuture` `topologyReadLock(GridCacheSharedContext cctx, GridFutureAdapter<?> fut)`
`void` `topologyReadUnlock(GridCacheSharedContext cctx)`
`IgniteCheckedException` `validateTopology(GridCacheSharedContext cctx, 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 Integer firstCacheId()

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

#### awaitLastFut

    public void awaitLastFut(GridCacheSharedContext cctx)

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

#### validateTopology

    public IgniteCheckedException validateTopology(GridCacheSharedContext cctx,
                                          GridDhtTopologyFuture topFut)

Specified by:
  `validateTopology` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
  `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.

#### hasNearCache

    public boolean hasNearCache(GridCacheSharedContext cctx)

Specified by:
  `hasNearCache` in interface `IgniteTxState`
Parameters:
  `cctx` - Context.
Returns:
  `True` is tx has active near cache.

#### addActiveCache

    public void addActiveCache(GridCacheContext cacheCtx,
                      IgniteTxLocalAdapter tx)
                        throws IgniteCheckedException

Specified by:
  `addActiveCache` in interface `IgniteTxState`
Parameters:
  `cacheCtx` - Ccntext.
  `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.

#### storeUsed

    public boolean storeUsed(GridCacheSharedContext cctx)

Specified by:
  `storeUsed` 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.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017