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 Description IgniteTxRemoteStateAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActiveCache(GridCacheContext cctx, boolean recovery, IgniteTxAdapter tx)@Nullable GridIntListcacheIds()Gets caches ids affected with current tx.@Nullable IntegerfirstCacheId()booleanhasInterceptor(GridCacheSharedContext cctx)booleanimplicitSingle()voidonTxEnd(GridCacheSharedContext cctx, IgniteInternalTx tx, boolean commit)booleanstoreWriteThrough(GridCacheSharedContext cctx)CacheWriteSynchronizationModesyncMode(GridCacheSharedContext cctx)GridDhtTopologyFuturetopologyReadLock(GridCacheSharedContext cctx, GridFutureAdapter<?> fut)voidtopologyReadUnlock(GridCacheSharedContext cctx)IgniteCheckedExceptionvalidateTopology(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
-
-
-
-
Method Detail
-
implicitSingle
public boolean implicitSingle()
- Specified by:
implicitSinglein interfaceIgniteTxState- Returns:
- Flag indicating whether transaction is implicit with only one key.
-
firstCacheId
@Nullable public @Nullable Integer firstCacheId()
- Specified by:
firstCacheIdin interfaceIgniteTxState- Returns:
- First tx cache id.
-
cacheIds
@Nullable public @Nullable GridIntList cacheIds()
Gets caches ids affected with current tx.- Specified by:
cacheIdsin interfaceIgniteTxState- Returns:
- tx cache ids.
-
validateTopology
public IgniteCheckedException validateTopology(GridCacheSharedContext cctx, boolean read, GridDhtTopologyFuture topFut)
- Specified by:
validateTopologyin interfaceIgniteTxState- Parameters:
cctx- Context.read-Trueif validating for a read operation,falsefor write.topFut- Topology future.- Returns:
- Error if validation failed.
-
syncMode
public CacheWriteSynchronizationMode syncMode(GridCacheSharedContext cctx)
- Specified by:
syncModein interfaceIgniteTxState- Parameters:
cctx- Context.- Returns:
- Write synchronization mode.
-
addActiveCache
public void addActiveCache(GridCacheContext cctx, boolean recovery, IgniteTxAdapter tx) throws IgniteCheckedException
- Specified by:
addActiveCachein interfaceIgniteTxState- Parameters:
cctx- Context.tx- Transaction.- Throws:
IgniteCheckedException- If cache check failed.
-
topologyReadLock
public GridDhtTopologyFuture topologyReadLock(GridCacheSharedContext cctx, GridFutureAdapter<?> fut)
- Specified by:
topologyReadLockin interfaceIgniteTxState- 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:
topologyReadUnlockin interfaceIgniteTxState- Parameters:
cctx- Context.
-
storeWriteThrough
public boolean storeWriteThrough(GridCacheSharedContext cctx)
- Specified by:
storeWriteThroughin interfaceIgniteTxState- Parameters:
cctx- Context.- Returns:
Trueif transaction is allowed to use store and transactions spans one or more caches with store enabled.
-
hasInterceptor
public boolean hasInterceptor(GridCacheSharedContext cctx)
- Specified by:
hasInterceptorin interfaceIgniteTxState- Parameters:
cctx- Context.- Returns:
Trueif transaction spans one or more caches with configured interceptor.
-
onTxEnd
public void onTxEnd(GridCacheSharedContext cctx, IgniteInternalTx tx, boolean commit)
- Specified by:
onTxEndin interfaceIgniteTxState- Parameters:
cctx- Context.tx- Transaction.commit- Commit flag.
-
-