public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProcessor, DatabaseLifecycleListener
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
MvccProcessorImpl(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
ackQueryDone(MvccSnapshot snapshot,
long qryId) |
IgniteInternalFuture<Void> |
ackTxCommit(MvccSnapshot updateVer) |
void |
ackTxRollback(MvccVersion updateVer) |
void |
addQueryTracker(MvccQueryTracker tracker) |
void |
afterBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr,
GridCacheDatabaseSharedManager.RestoreBinaryState restoreState)
Callback executed when binary memory has fully restored and WAL logging is resumed.
|
void |
beforeBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr)
Callback executed right before node become perform binary recovery.
|
void |
beforeResumeWalLogging(IgniteCacheDatabaseSharedManager mgr)
Callback executed when all physical updates are applied and we are ready to write new physical records
during logical recovery.
|
void |
beforeStop(IgniteCacheDatabaseSharedManager mgr)
Callback executed before shared manager will be stopped.
|
Optional<? extends MvccVersion> |
checkWaiting(MvccVersion mvccVer)
Checks whether one tx is waiting for another tx.
|
@NotNull MvccCoordinator |
currentCoordinator() |
void |
dumpDebugInfo(IgniteLogger log,
@Nullable IgniteDiagnosticPrepareContext diagCtx) |
void |
ensureStarted()
Starts MVCC processor (i.e. initialises data structures and vacuum) if it has not been started yet.
|
void |
failWaiter(MvccVersion mvccVer,
Exception e)
Unfreezes waiter for specific version failing it with passed exception.
|
boolean |
hasLocalTransaction(long crd,
long cntr) |
boolean |
mvccEnabled() |
void |
onCacheStop(GridCacheContext cctx)
Cache stop callback.
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onExchangeDone(DiscoCache discoCache)
Exchange done callback.
|
void |
onInitDataRegions(IgniteCacheDatabaseSharedManager mgr)
Callback executed when data regions become to start-up.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onLocalJoin(DiscoveryEvent evt,
DiscoCache discoCache)
Local join callback.
|
void |
preProcessCacheConfiguration(CacheConfiguration ccfg)
Pre-processes cache configuration before start.
|
void |
registerLocalTransaction(long crd,
long cntr) |
void |
releaseWaiters(MvccVersion locked) |
void |
removeQueryTracker(Long id) |
IgniteInternalFuture<MvccSnapshot> |
requestReadSnapshotAsync()
Requests snapshot on Mvcc coordinator.
|
void |
requestReadSnapshotAsync(MvccCoordinator crd,
MvccSnapshotResponseListener lsnr)
Requests snapshot on Mvcc coordinator.
|
MvccSnapshot |
requestReadSnapshotLocal() |
IgniteInternalFuture<MvccSnapshot> |
requestWriteSnapshotAsync()
Requests snapshot on Mvcc coordinator.
|
void |
requestWriteSnapshotAsync(MvccCoordinator crd,
MvccSnapshotResponseListener lsnr)
Requests snapshot on Mvcc coordinator.
|
MvccSnapshot |
requestWriteSnapshotLocal() |
void |
start()
Starts grid component.
|
byte |
state(long crdVer,
long cntr) |
byte |
state(MvccVersion ver) |
void |
stopTxLog()
Force txLog stop.
|
void |
updateState(MvccVersion ver,
byte state) |
void |
updateState(MvccVersion ver,
byte state,
boolean primary) |
void |
validateCacheConfiguration(CacheConfiguration ccfg)
Validates cache configuration before start.
|
@Nullable IgniteNodeValidationResult |
validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
IgniteInternalFuture<Void> |
waitForLock(GridCacheContext cctx,
MvccVersion waiterVer,
MvccVersion blockerVer)
Stands in the lock wait queue for the current lock holder.
|
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onReconnected, printMemoryStats, stop, toString, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcollectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onReconnected, printMemoryStats, stop, validateNodeafterInitialise, afterLogicalUpdatesApplied, onBaselineChangepublic MvccProcessorImpl(GridKernalContext ctx)
ctx - Context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public boolean mvccEnabled()
mvccEnabled in interface MvccProcessorTrue if at least one cache with
CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT mode is registered.public void preProcessCacheConfiguration(CacheConfiguration ccfg)
preProcessCacheConfiguration in interface MvccProcessorccfg - Cache configuration to pre-process.public void validateCacheConfiguration(CacheConfiguration ccfg)
validateCacheConfiguration in interface MvccProcessorccfg - Cache configuration to validate.@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.null in case of success.public void ensureStarted()
throws IgniteCheckedException
ensureStarted in interface MvccProcessorIgniteCheckedException - If failed to initialize.public void onCacheStop(GridCacheContext cctx)
onCacheStop in interface MvccProcessorcctx - Cache context.public void beforeStop(IgniteCacheDatabaseSharedManager mgr)
beforeStop in interface DatabaseLifecycleListenermgr - Database shared manager.public void stopTxLog()
stopTxLog in interface MvccProcessorpublic void onInitDataRegions(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException
onInitDataRegions in interface DatabaseLifecycleListenermgr - Database shared manager.IgniteCheckedException - If failed.public void beforeResumeWalLogging(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException
beforeResumeWalLogging in interface DatabaseLifecycleListenermgr - Database shared manager.IgniteCheckedException - If failed.public void beforeBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException
beforeBinaryMemoryRestore in interface DatabaseLifecycleListenermgr - Database shared manager.IgniteCheckedException - If failed.public void afterBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr, GridCacheDatabaseSharedManager.RestoreBinaryState restoreState) throws IgniteCheckedException
afterBinaryMemoryRestore in interface DatabaseLifecycleListenerrestoreState - Result of binary recovery.IgniteCheckedException - If failed.public void onExchangeDone(DiscoCache discoCache)
onExchangeDone in interface MvccProcessordiscoCache - Disco cache.public void onLocalJoin(DiscoveryEvent evt, DiscoCache discoCache)
onLocalJoin in interface MvccProcessorevt - Discovery event.discoCache - Disco cache.public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.@NotNull public @NotNull MvccCoordinator currentCoordinator()
currentCoordinator in interface MvccProcessorpublic byte state(MvccVersion ver)
state in interface MvccProcessorver - Version to check.public byte state(long crdVer,
long cntr)
state in interface MvccProcessorcrdVer - Mvcc coordinator version.cntr - Mvcc counter.public void updateState(MvccVersion ver, byte state)
updateState in interface MvccProcessorver - Version.state - State.public void updateState(MvccVersion ver, byte state, boolean primary)
updateState in interface MvccProcessorver - Version.state - State.primary - Flag if this is primary node.public void registerLocalTransaction(long crd,
long cntr)
registerLocalTransaction in interface MvccProcessorcrd - Mvcc coordinator version.cntr - Mvcc counter.public boolean hasLocalTransaction(long crd,
long cntr)
hasLocalTransaction in interface MvccProcessorcrd - Mvcc coordinator version.cntr - Mvcc counter.True if there is an active local transaction with given version.public IgniteInternalFuture<Void> waitForLock(GridCacheContext cctx, MvccVersion waiterVer, MvccVersion blockerVer)
waitForLock in interface MvccProcessorcctx - Cache context.waiterVer - Version of the waiting tx.blockerVer - Version the entry is locked by.public void releaseWaiters(MvccVersion locked)
releaseWaiters in interface MvccProcessorlocked - Version the entry is locked by.public void addQueryTracker(MvccQueryTracker tracker)
addQueryTracker in interface MvccProcessortracker - Query tracker.public void removeQueryTracker(Long id)
removeQueryTracker in interface MvccProcessorid - Query tracker id.public MvccSnapshot requestWriteSnapshotLocal()
requestWriteSnapshotLocal in interface MvccProcessorMvccSnapshot if this is a coordinator node and coordinator is initialized.
Null in other cases.public MvccSnapshot requestReadSnapshotLocal()
requestReadSnapshotLocal in interface MvccProcessorMvccSnapshot if this is a coordinator node and coordinator is initialized.
Null in other cases.public IgniteInternalFuture<MvccSnapshot> requestReadSnapshotAsync()
requestReadSnapshotAsync in interface MvccProcessorpublic IgniteInternalFuture<MvccSnapshot> requestWriteSnapshotAsync()
requestWriteSnapshotAsync in interface MvccProcessorpublic void requestReadSnapshotAsync(MvccCoordinator crd, MvccSnapshotResponseListener lsnr)
requestReadSnapshotAsync in interface MvccProcessorcrd - Expected coordinator.lsnr - Request listener.public void requestWriteSnapshotAsync(MvccCoordinator crd, MvccSnapshotResponseListener lsnr)
requestWriteSnapshotAsync in interface MvccProcessorcrd - Expected coordinator.lsnr - Request listener.public IgniteInternalFuture<Void> ackTxCommit(MvccSnapshot updateVer)
ackTxCommit in interface MvccProcessorupdateVer - Transaction update version.public void ackTxRollback(MvccVersion updateVer)
ackTxRollback in interface MvccProcessorupdateVer - Transaction update version.public void ackQueryDone(MvccSnapshot snapshot, long qryId)
ackQueryDone in interface MvccProcessorsnapshot - Query version.qryId - Query tracker ID.public void dumpDebugInfo(IgniteLogger log, @Nullable @Nullable IgniteDiagnosticPrepareContext diagCtx)
dumpDebugInfo in interface MvccProcessorlog - Logger.diagCtx - Diagnostic request.public Optional<? extends MvccVersion> checkWaiting(MvccVersion mvccVer)
checkWaiting in interface MvccProcessormvccVer - Version of transaction which is checked for being waiting.public void failWaiter(MvccVersion mvccVer, Exception e)
failWaiter in interface MvccProcessormvccVer - Version of a waiter to fail.e - Exception reflecting failure reason.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021