public class MvccProcessorImpl extends GridProcessorAdapter implements MvccProcessor, DatabaseLifecycleListener
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
MvccProcessorImpl(GridKernalContext ctx) |
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, stop, toString, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcollectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, stop, validateNodepublic 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 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 beforeStop(IgniteCacheDatabaseSharedManager mgr)
beforeStop in interface DatabaseLifecycleListenermgr - Database shared manager.public void onInitDataRegions(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException
onInitDataRegions in interface DatabaseLifecycleListenermgr - Database shared manager.IgniteCheckedExceptionpublic void afterInitialise(IgniteCacheDatabaseSharedManager mgr)
afterInitialise in interface DatabaseLifecycleListenermgr - Database shared manager.public void beforeMemoryRestore(IgniteCacheDatabaseSharedManager mgr) throws IgniteCheckedException
beforeMemoryRestore in interface DatabaseLifecycleListenermgr - Page store manager.IgniteCheckedExceptionpublic void afterMemoryRestore(IgniteCacheDatabaseSharedManager mgr)
afterMemoryRestore in interface DatabaseLifecycleListenermgr - Database shared manager.public void onDiscoveryEvent(int evtType,
Collection<ClusterNode> nodes,
long topVer,
@Nullable
DiscoveryCustomMessage customMsg)
onDiscoveryEvent in interface MvccProcessorevtType - Event type.nodes - Current nodes.topVer - Topology version.customMsg - Messagepublic void onExchangeStart(MvccCoordinator mvccCrd, ExchangeContext exchCtx, ClusterNode exchCrd)
onExchangeStart in interface MvccProcessormvccCrd - Mvcc coordinator.exchCtx - Exchange context.exchCrd - Exchange coordinator.public void onExchangeDone(boolean newCrd,
DiscoCache discoCache,
Map<UUID,GridLongList> activeQueries)
onExchangeDone in interface MvccProcessornewCrd - New coordinator flag.discoCache - Disco cache.activeQueries - Active queries.public void processClientActiveQueries(UUID nodeId, @Nullable GridLongList activeQueries)
processClientActiveQueries in interface MvccProcessornodeId - Node IDactiveQueries - Active queries.@Nullable public MvccCoordinator currentCoordinator()
currentCoordinator in interface MvccProcessor@Nullable public MvccCoordinator currentCoordinator(AffinityTopologyVersion topVer)
currentCoordinator in interface MvccProcessortopVer - Topology version.@Nullable public MvccCoordinator assignedCoordinator()
assignedCoordinator in interface MvccProcessorpublic UUID currentCoordinatorId()
currentCoordinatorId in interface MvccProcessorpublic void updateCoordinator(MvccCoordinator curCrd)
updateCoordinator in interface MvccProcessorcurCrd - Coordinator.public byte state(MvccVersion ver) throws IgniteCheckedException
state in interface MvccProcessorver - Version to check.IgniteCheckedException - If fails.public byte state(long crdVer,
long cntr)
throws IgniteCheckedException
state in interface MvccProcessorcrdVer - Mvcc coordinator version.cntr - Mvcc counter.IgniteCheckedException - If fails.public void updateState(MvccVersion ver, byte state) throws IgniteCheckedException
updateState in interface MvccProcessorver - Version.state - State.IgniteCheckedException - If fails;public void updateState(MvccVersion ver, byte state, boolean primary) throws IgniteCheckedException
updateState in interface MvccProcessorver - Version.state - State.primary - Flag if this is primary node.IgniteCheckedException - If fails;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> waitFor(GridCacheContext cctx, MvccVersion locked) throws IgniteCheckedException
waitFor in interface MvccProcessorcctx - Cache context.locked - Version the entry is locked by.IgniteCheckedException - If failed.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 tryRequestSnapshotLocal() throws ClusterTopologyCheckedException
tryRequestSnapshotLocal in interface MvccProcessorMvccSnapshot if this is a coordinator node and coordinator is initialized.
Null in other cases.ClusterTopologyCheckedException - If coordinator doesn't match locked topology or not assigned.public MvccSnapshot tryRequestSnapshotLocal(@Nullable IgniteInternalTx tx) throws ClusterTopologyCheckedException
tryRequestSnapshotLocal in interface MvccProcessortx - Transaction.MvccSnapshot if this is a coordinator node and coordinator is initialized.
Null in other cases.ClusterTopologyCheckedException - If coordinator doesn't match locked topology or not assigned.public IgniteInternalFuture<MvccSnapshot> requestSnapshotAsync(IgniteInternalTx tx)
requestSnapshotAsync in interface MvccProcessortx - Transaction.public void requestSnapshotAsync(MvccSnapshotResponseListener lsnr)
requestSnapshotAsync in interface MvccProcessorlsnr - Request listener.public void requestSnapshotAsync(IgniteInternalTx tx, MvccSnapshotResponseListener lsnr)
requestSnapshotAsync in interface MvccProcessortx - Transactionlsnr - Request listener.public IgniteInternalFuture<Void> ackTxCommit(MvccSnapshot updateVer)
ackTxCommit in interface MvccProcessorupdateVer - Transaction update version.public IgniteInternalFuture<Void> ackTxCommit(MvccVersion updateVer, MvccSnapshot readSnapshot, long qryId)
ackTxCommit in interface MvccProcessorupdateVer - Transaction update version.readSnapshot - Transaction read version.qryId - Query tracker id.public void ackTxRollback(MvccVersion updateVer)
ackTxRollback in interface MvccProcessorupdateVer - Transaction update version.public void ackTxRollback(MvccVersion updateVer, MvccSnapshot readSnapshot, long qryTrackerId)
ackTxRollback in interface MvccProcessorupdateVer - Transaction update version.readSnapshot - Transaction read version.qryTrackerId - Query tracker id.public void ackQueryDone(MvccSnapshot snapshot, long qryId)
ackQueryDone in interface MvccProcessorsnapshot - Query version.qryId - Query tracker ID.public IgniteInternalFuture<Void> waitTxsFuture(UUID crdId, GridLongList txs)
waitTxsFuture in interface MvccProcessorcrdId - Coordinator ID.txs - Transaction IDs.public void dumpDebugInfo(IgniteLogger log, @Nullable IgniteDiagnosticPrepareContext diagCtx)
dumpDebugInfo in interface MvccProcessorlog - Logger.diagCtx - Diagnostic request.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019