org.apache.ignite.internal.processors.cache.mvcc

## Interface MvccProcessor

All Superinterfaces:
  GridComponent, GridProcessor

All Known Implementing Classes:
  MvccProcessorImpl

    public interface MvccProcessor
    extends GridProcessor

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `ackQueryDone(MvccSnapshot snapshot, long qryId)`
`IgniteInternalFuture<Void>` `ackTxCommit(MvccSnapshot updateVer)`
`IgniteInternalFuture<Void>` `ackTxCommit(MvccVersion updateVer, MvccSnapshot readSnapshot, long qryId)`
`void` `ackTxRollback(MvccVersion updateVer)`
`void` `ackTxRollback(MvccVersion updateVer, MvccSnapshot readSnapshot, long qryTrackerId)`
`void` `addQueryTracker(MvccQueryTracker tracker)`
`MvccCoordinator` `assignedCoordinator()`
`MvccCoordinator` `currentCoordinator()`
`MvccCoordinator` `currentCoordinator(AffinityTopologyVersion topVer)` Check that the given topology is greater or equals to coordinator's one and returns current coordinator.
`UUID` `currentCoordinatorId()`
`void` `dumpDebugInfo(IgniteLogger log, IgniteDiagnosticPrepareContext diagCtx)`
`void` `ensureStarted()` Starts MVCC processor (i.e. initialises data structures and vacuum) if it has not been started yet.
`boolean` `hasLocalTransaction(long crd, long cntr)`
`boolean` `mvccEnabled()`
`void` `onDiscoveryEvent(int evtType, Collection<ClusterNode> nodes, long topVer, DiscoveryCustomMessage customMsg)`
`void` `onExchangeDone(boolean newCoord, DiscoCache discoCache, Map<UUID,GridLongList> activeQueries)` Exchange done callback.
`void` `onExchangeStart(MvccCoordinator mvccCrd, ExchangeContext exchCtx, ClusterNode exchCrd)` Exchange start callback.
`void` `preProcessCacheConfiguration(CacheConfiguration ccfg)` Pre-processes cache configuration before start.
`void` `processClientActiveQueries(UUID nodeId, GridLongList activeQueries)`
`void` `registerLocalTransaction(long crd, long cntr)`
`void` `removeQueryTracker(Long id)`
`IgniteInternalFuture<MvccSnapshot>` `requestSnapshotAsync(IgniteInternalTx tx)` Requests snapshot on Mvcc coordinator.
`void` `requestSnapshotAsync(IgniteInternalTx tx, MvccSnapshotResponseListener lsnr)` Requests snapshot on Mvcc coordinator.
`void` `requestSnapshotAsync(MvccSnapshotResponseListener lsnr)` Requests snapshot on Mvcc coordinator.
`byte` `state(long crdVer, long cntr)`
`byte` `state(MvccVersion ver)`
`MvccSnapshot` `tryRequestSnapshotLocal()`
`MvccSnapshot` `tryRequestSnapshotLocal(IgniteInternalTx tx)`
`void` `updateCoordinator(MvccCoordinator curCrd)`
`void` `updateState(MvccVersion ver, byte state)`
`void` `updateState(MvccVersion ver, byte state, boolean primary)`
`void` `validateCacheConfiguration(CacheConfiguration ccfg)` Validates cache configuration before start.
`IgniteInternalFuture<Void>` `waitFor(GridCacheContext cctx, MvccVersion locked)`
`IgniteInternalFuture<Void>` `waitTxsFuture(UUID crdId, GridLongList txs)`

### Methods inherited from interface org.apache.ignite.internal.GridComponent

`collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, validateNode, validateNode`

### Method Detail

#### onDiscoveryEvent

    void onDiscoveryEvent(int evtType,
                          Collection<ClusterNode> nodes,
                          long topVer,
                          @Nullable
                          DiscoveryCustomMessage customMsg)

Parameters:
  `evtType` - Event type.
  `nodes` - Current nodes.
  `topVer` - Topology version.
  `customMsg` - Message

#### onExchangeStart

    void onExchangeStart(MvccCoordinator mvccCrd,
                         ExchangeContext exchCtx,
                         ClusterNode exchCrd)

Exchange start callback.

Parameters:
  `mvccCrd` - Mvcc coordinator.
  `exchCtx` - Exchange context.
  `exchCrd` - Exchange coordinator.

#### onExchangeDone

    void onExchangeDone(boolean newCoord,
                        DiscoCache discoCache,
                        Map<UUID,GridLongList> activeQueries)

Exchange done callback.

Parameters:
  `newCoord` - New coordinator flag.
  `discoCache` - Disco cache.
  `activeQueries` - Active queries.

#### processClientActiveQueries

    void processClientActiveQueries(UUID nodeId,
                                    @Nullable
                                    GridLongList activeQueries)

Parameters:
  `nodeId` - Node ID
  `activeQueries` - Active queries.

#### assignedCoordinator

    @Nullable
    MvccCoordinator assignedCoordinator()

Returns:
  Mvcc coordinator received from discovery event.

#### currentCoordinator

    @Nullable
    MvccCoordinator currentCoordinator()

Returns:
  Coordinator.

#### currentCoordinator

    @Nullable
    MvccCoordinator currentCoordinator(AffinityTopologyVersion topVer)

Check that the given topology is greater or equals to coordinator's one and returns current coordinator.

Parameters:
  `topVer` - Topology version.
Returns:
  Mvcc coordinator.

#### currentCoordinatorId

    UUID currentCoordinatorId()

Returns:
  Current coordinator node ID.

#### updateCoordinator

    void updateCoordinator(MvccCoordinator curCrd)

Parameters:
  `curCrd` - Coordinator.

#### state

    byte state(long crdVer,
               long cntr)
        throws IgniteCheckedException

Parameters:
  `crdVer` - Mvcc coordinator version.
  `cntr` - Mvcc counter.
Returns:
  State for given mvcc version.
Throws:
  `IgniteCheckedException` - If fails.

#### state

    byte state(MvccVersion ver)
        throws IgniteCheckedException

Parameters:
  `ver` - Version to check.
Returns:
  State for given mvcc version.
Throws:
  `IgniteCheckedException` - If fails.

#### updateState

    void updateState(MvccVersion ver,
                     byte state)
              throws IgniteCheckedException

Parameters:
  `ver` - Version.
  `state` - State.
Throws:
  `IgniteCheckedException` - If fails;

#### updateState

    void updateState(MvccVersion ver,
                     byte state,
                     boolean primary)
              throws IgniteCheckedException

Parameters:
  `ver` - Version.
  `state` - State.
  `primary` - Flag if this is primary node.
Throws:
  `IgniteCheckedException` - If fails;

#### registerLocalTransaction

    void registerLocalTransaction(long crd,
                                  long cntr)

Parameters:
  `crd` - Mvcc coordinator version.
  `cntr` - Mvcc counter.

#### hasLocalTransaction

    boolean hasLocalTransaction(long crd,
                                long cntr)

Parameters:
  `crd` - Mvcc coordinator version.
  `cntr` - Mvcc counter.
Returns:
  `True` if there is an active local transaction with given version.

#### waitFor

    IgniteInternalFuture<Void> waitFor(GridCacheContext cctx,
                                       MvccVersion locked)
                                throws IgniteCheckedException

Parameters:
  `cctx` - Cache context.
  `locked` - Version the entry is locked by.
Returns:
  Future, which is completed as soon as the lock is released.
Throws:
  `IgniteCheckedException` - If failed.

#### addQueryTracker

    void addQueryTracker(MvccQueryTracker tracker)

Parameters:
  `tracker` - Query tracker.

#### removeQueryTracker

    void removeQueryTracker(Long id)

Parameters:
  `id` - Query tracker id.

#### tryRequestSnapshotLocal

    MvccSnapshot tryRequestSnapshotLocal()
                                  throws ClusterTopologyCheckedException

Returns:
  `MvccSnapshot` if this is a coordinator node and coordinator is initialized. `Null` in other cases.
Throws:
  `ClusterTopologyCheckedException` - If coordinator doesn't match locked topology or not assigned.

#### tryRequestSnapshotLocal

    MvccSnapshot tryRequestSnapshotLocal(@Nullable
                                         IgniteInternalTx tx)
                                  throws ClusterTopologyCheckedException

Parameters:
  `tx` - Transaction.
Returns:
  `MvccSnapshot` if this is a coordinator node and coordinator is initialized. `Null` in other cases.
Throws:
  `ClusterTopologyCheckedException` - If coordinator doesn't match locked topology or not assigned.

#### requestSnapshotAsync

    IgniteInternalFuture<MvccSnapshot> requestSnapshotAsync(IgniteInternalTx tx)

Requests snapshot on Mvcc coordinator.

Parameters:
  `tx` - Transaction.
Returns:
  Snapshot future.

#### requestSnapshotAsync

    void requestSnapshotAsync(MvccSnapshotResponseListener lsnr)

Requests snapshot on Mvcc coordinator.

Parameters:
  `lsnr` - Request listener.

#### requestSnapshotAsync

    void requestSnapshotAsync(IgniteInternalTx tx,
                              MvccSnapshotResponseListener lsnr)

Requests snapshot on Mvcc coordinator.

Parameters:
  `tx` - Transaction
  `lsnr` - Request listener.

#### ackTxCommit

    IgniteInternalFuture<Void> ackTxCommit(MvccSnapshot updateVer)

Parameters:
  `updateVer` - Transaction update version.
Returns:
  Acknowledge future.

#### ackTxCommit

    IgniteInternalFuture<Void> ackTxCommit(MvccVersion updateVer,
                                           MvccSnapshot readSnapshot,
                                           long qryId)

Parameters:
  `updateVer` - Transaction update version.
  `readSnapshot` - Transaction read version.
  `qryId` - Query tracker id.
Returns:
  Acknowledge future.

#### ackTxRollback

    void ackTxRollback(MvccVersion updateVer)

Parameters:
  `updateVer` - Transaction update version.

#### ackTxRollback

    void ackTxRollback(MvccVersion updateVer,
                       MvccSnapshot readSnapshot,
                       long qryTrackerId)

Parameters:
  `updateVer` - Transaction update version.
  `readSnapshot` - Transaction read version.
  `qryTrackerId` - Query tracker id.

#### ackQueryDone

    void ackQueryDone(MvccSnapshot snapshot,
                      long qryId)

Parameters:
  `snapshot` - Query version.
  `qryId` - Query tracker ID.

#### waitTxsFuture

    IgniteInternalFuture<Void> waitTxsFuture(UUID crdId,
                                             GridLongList txs)

Parameters:
  `crdId` - Coordinator ID.
  `txs` - Transaction IDs.
Returns:
  Future.

#### dumpDebugInfo

    void dumpDebugInfo(IgniteLogger log,
                       @Nullable
                       IgniteDiagnosticPrepareContext diagCtx)

Parameters:
  `log` - Logger.
  `diagCtx` - Diagnostic request.

#### mvccEnabled

    boolean mvccEnabled()

Returns:
  `True` if at least one cache with `CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT` mode is registered.

#### preProcessCacheConfiguration

    void preProcessCacheConfiguration(CacheConfiguration ccfg)

Pre-processes cache configuration before start.

Parameters:
  `ccfg` - Cache configuration to pre-process.

#### validateCacheConfiguration

    void validateCacheConfiguration(CacheConfiguration ccfg)
                             throws IgniteCheckedException

Validates cache configuration before start.

Parameters:
  `ccfg` - Cache configuration to validate.
Throws:
  `IgniteCheckedException` - If validation failed.

#### ensureStarted

    void ensureStarted()
                throws IgniteCheckedException

Starts MVCC processor (i.e. initialises data structures and vacuum) if it has not been started yet.

Throws:
  `IgniteCheckedException` - If failed to initialize.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.6
Release Date | : September 11 2019