Search in sources :

Example 1 with IgniteCacheSnapshotManager

use of org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteCacheSnapshotManager in project ignite by apache.

the class GridCacheProcessor method createSharedContext.

/**
 * Creates shared context.
 *
 * @param kernalCtx Kernal context.
 * @param storeSesLsnrs Store session listeners.
 * @return Shared context.
 * @throws IgniteCheckedException If failed.
 */
@SuppressWarnings("unchecked")
private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx, Collection<CacheStoreSessionListener> storeSesLsnrs) throws IgniteCheckedException {
    IgniteTxManager tm = new IgniteTxManager();
    GridCacheMvccManager mvccMgr = new GridCacheMvccManager();
    GridCacheVersionManager verMgr = new GridCacheVersionManager();
    GridCacheDeploymentManager depMgr = new GridCacheDeploymentManager();
    GridCachePartitionExchangeManager exchMgr = new GridCachePartitionExchangeManager();
    IgniteCacheDatabaseSharedManager dbMgr;
    IgnitePageStoreManager pageStoreMgr = null;
    IgniteWriteAheadLogManager walMgr = null;
    if (CU.isPersistenceEnabled(ctx.config()) && !ctx.clientNode()) {
        dbMgr = new GridCacheDatabaseSharedManager(ctx);
        pageStoreMgr = ctx.plugins().createComponent(IgnitePageStoreManager.class);
        if (pageStoreMgr == null)
            pageStoreMgr = new FilePageStoreManager(ctx);
        walMgr = ctx.plugins().createComponent(IgniteWriteAheadLogManager.class);
        if (walMgr == null)
            walMgr = new FileWriteAheadLogManager(ctx);
    } else {
        if (CU.isPersistenceEnabled(ctx.config()) && ctx.clientNode()) {
            U.warn(log, "Persistent Store is not supported on client nodes (Persistent Store's" + " configuration will be ignored).");
        }
        dbMgr = new IgniteCacheDatabaseSharedManager();
    }
    WalStateManager walStateMgr = new WalStateManager(ctx);
    IgniteSnapshotManager snapshotMgr = new IgniteSnapshotManager(ctx);
    IgniteCacheSnapshotManager snpMgr = ctx.plugins().createComponent(IgniteCacheSnapshotManager.class);
    if (snpMgr == null)
        snpMgr = new IgniteCacheSnapshotManager();
    GridCacheIoManager ioMgr = new GridCacheIoManager();
    CacheAffinitySharedManager topMgr = new CacheAffinitySharedManager();
    GridCacheSharedTtlCleanupManager ttl = new GridCacheSharedTtlCleanupManager();
    PartitionsEvictManager evict = new PartitionsEvictManager();
    CacheJtaManagerAdapter jta = JTA.createOptional();
    MvccCachingManager mvccCachingMgr = new MvccCachingManager();
    DeadlockDetectionManager deadlockDetectionMgr = new DeadlockDetectionManager();
    CacheDiagnosticManager diagnosticMgr = new CacheDiagnosticManager();
    return new GridCacheSharedContext(kernalCtx, tm, verMgr, mvccMgr, pageStoreMgr, walMgr, walStateMgr, dbMgr, snapshotMgr, snpMgr, depMgr, exchMgr, topMgr, ioMgr, ttl, evict, jta, storeSesLsnrs, mvccCachingMgr, deadlockDetectionMgr, diagnosticMgr);
}
Also used : CacheJtaManagerAdapter(org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter) IgnitePageStoreManager(org.apache.ignite.internal.pagemem.store.IgnitePageStoreManager) IgniteWriteAheadLogManager(org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager) IgniteCacheSnapshotManager(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteCacheSnapshotManager) GridCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager) MvccCachingManager(org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager) IgniteTxManager(org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager) FilePageStoreManager(org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager) DeadlockDetectionManager(org.apache.ignite.internal.processors.cache.mvcc.DeadlockDetectionManager) GridCacheVersionManager(org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager) PartitionsEvictManager(org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager) FileWriteAheadLogManager(org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager) IgniteSnapshotManager(org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager) IgniteCacheDatabaseSharedManager(org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager)

Aggregations

IgnitePageStoreManager (org.apache.ignite.internal.pagemem.store.IgnitePageStoreManager)1 IgniteWriteAheadLogManager (org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager)1 PartitionsEvictManager (org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager)1 CacheJtaManagerAdapter (org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter)1 DeadlockDetectionManager (org.apache.ignite.internal.processors.cache.mvcc.DeadlockDetectionManager)1 MvccCachingManager (org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager)1 GridCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager)1 IgniteCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager)1 FilePageStoreManager (org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager)1 IgniteCacheSnapshotManager (org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteCacheSnapshotManager)1 IgniteSnapshotManager (org.apache.ignite.internal.processors.cache.persistence.snapshot.IgniteSnapshotManager)1 FileWriteAheadLogManager (org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager)1 IgniteTxManager (org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager)1 GridCacheVersionManager (org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager)1