From c861ac5ba427311aeee469102ea65a33e58b4678 Mon Sep 17 00:00:00 2001 From: Maksim Timonin Date: Wed, 25 Oct 2023 22:38:24 +0300 Subject: [PATCH] IGNITE-20733 Add GridCacheSharedContext builder (#11011) --- .../processors/cache/GridCacheProcessor.java | 60 ++--- .../cache/GridCacheSharedContext.java | 213 +++++++++++++++++- .../snapshot/IgniteSnapshotManager.java | 5 +- .../wal/reader/IgniteWalIteratorFactory.java | 9 +- .../IgniteWalIteratorSwitchSegmentTest.java | 52 +---- .../pagemem/BPlusTreePageMemoryImplTest.java | 27 +-- .../BPlusTreeReuseListPageMemoryImplTest.java | 26 +-- .../IndexStoragePageMemoryImplTest.java | 27 +-- .../pagemem/PageMemoryImplNoLoadTest.java | 26 +-- .../pagemem/PageMemoryImplTest.java | 26 +-- .../hashmap/GridCacheTestContext.java | 36 ++- 11 files changed, 287 insertions(+), 220 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 2a12207311c28..41871d0997162 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java @@ -107,7 +107,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearAtomicCache; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTransactionalCache; import org.apache.ignite.internal.processors.cache.dr.GridCacheDrManager; -import org.apache.ignite.internal.processors.cache.jta.CacheJtaManagerAdapter; import org.apache.ignite.internal.processors.cache.mvcc.MvccCachingManager; import org.apache.ignite.internal.processors.cache.persistence.DataRegion; import org.apache.ignite.internal.processors.cache.persistence.DatabaseLifecycleListener; @@ -3032,12 +3031,6 @@ private GridCacheSharedContext createSharedContext( GridKernalContext kernalCtx, Collection 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; @@ -3066,45 +3059,30 @@ private GridCacheSharedContext createSharedContext( walMgr = new FileWriteAheadLogManager(ctx); } - WalStateManager walStateMgr = new WalStateManager(ctx); - IgniteSnapshotManager snapshotMgr = ctx.plugins().createComponent(IgniteSnapshotManager.class); if (snapshotMgr == null) snapshotMgr = new IgniteSnapshotManager(ctx); - GridCacheIoManager ioMgr = new GridCacheIoManager(); - CacheAffinitySharedManager topMgr = new CacheAffinitySharedManager(); - GridCacheSharedTtlCleanupManager ttl = new GridCacheSharedTtlCleanupManager(); - PartitionsEvictManager evict = new PartitionsEvictManager(); - - CacheJtaManagerAdapter jta = JTA.createOptional(); - - MvccCachingManager mvccCachingMgr = new MvccCachingManager(); - - CacheDiagnosticManager diagnosticMgr = new CacheDiagnosticManager(); - - return new GridCacheSharedContext( - kernalCtx, - tm, - verMgr, - mvccMgr, - pageStoreMgr, - walMgr, - walStateMgr, - dbMgr, - snapshotMgr, - depMgr, - exchMgr, - topMgr, - ioMgr, - ttl, - evict, - jta, - storeSesLsnrs, - mvccCachingMgr, - diagnosticMgr - ); + return GridCacheSharedContext.builder() + .setTxManager(new IgniteTxManager()) + .setMvccManager(new GridCacheMvccManager()) + .setVersionManager(new GridCacheVersionManager()) + .setDeploymentManager(new GridCacheDeploymentManager()) + .setPartitionExchangeManager(new GridCachePartitionExchangeManager()) + .setDatabaseManager(dbMgr) + .setPageStoreManager(pageStoreMgr) + .setWalManager(walMgr) + .setWalStateManager(new WalStateManager(ctx)) + .setSnapshotManager(snapshotMgr) + .setIoManager(new GridCacheIoManager()) + .setAffinityManager(new CacheAffinitySharedManager()) + .setTtlCleanupManager(new GridCacheSharedTtlCleanupManager()) + .setPartitionsEvictManager(new PartitionsEvictManager()) + .setJtaManager(JTA.createOptional()) + .setMvccCachingManager(new MvccCachingManager()) + .setDiagnosticManager(new CacheDiagnosticManager()) + .build(kernalCtx, storeSesLsnrs); } /** {@inheritDoc} */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java index b0cf6b0b93f36..c1b9c95b53f95 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java @@ -187,6 +187,11 @@ public class GridCacheSharedContext { /** Cluster is in read-only mode. */ private volatile boolean readOnlyMode; + /** @return GridCacheSharedContext builder instance. */ + public static Builder builder() { + return new Builder(); + } + /** * @param kernalCtx Context. * @param txMgr Transaction manager. @@ -206,7 +211,7 @@ public class GridCacheSharedContext { * @param storeSesLsnrs Store session listeners. * @param mvccCachingMgr Mvcc caching manager. */ - public GridCacheSharedContext( + private GridCacheSharedContext( GridKernalContext kernalCtx, IgniteTxManager txMgr, GridCacheVersionManager verMgr, @@ -1207,4 +1212,210 @@ public void setTxManager(IgniteTxManager txMgr) { public boolean isLazyMemoryAllocation(@Nullable DataRegion region) { return gridConfig().isClientMode() || region == null || region.config().isLazyMemoryAllocation(); } + + /** Builder for {@link GridCacheSharedContext}. */ + public static class Builder { + /** */ + private IgniteTxManager txMgr; + + /** */ + private CacheJtaManagerAdapter jtaMgr; + + /** */ + private GridCacheVersionManager verMgr; + + /** */ + private GridCacheMvccManager mvccMgr; + + /** */ + private IgnitePageStoreManager pageStoreMgr; + + /** */ + private IgniteWriteAheadLogManager walMgr; + + /** */ + private WalStateManager walStateMgr; + + /** */ + private IgniteCacheDatabaseSharedManager dbMgr; + + /** */ + private IgniteSnapshotManager snapshotMgr; + + /** */ + private GridCacheDeploymentManager depMgr; + + /** */ + private GridCachePartitionExchangeManager exchMgr; + + /** */ + private CacheAffinitySharedManager affMgr; + + /** */ + private GridCacheIoManager ioMgr; + + /** */ + private GridCacheSharedTtlCleanupManager ttlMgr; + + /** */ + private PartitionsEvictManager evictMgr; + + /** */ + private MvccCachingManager mvccCachingMgr; + + /** */ + private CacheDiagnosticManager diagnosticMgr; + + /** */ + private Builder() { + // No-op. + } + + /** */ + public GridCacheSharedContext build( + GridKernalContext kernalCtx, + Collection storeSesLsnrs + ) { + return new GridCacheSharedContext( + kernalCtx, + txMgr, + verMgr, + mvccMgr, + pageStoreMgr, + walMgr, + walStateMgr, + dbMgr, + snapshotMgr, + depMgr, + exchMgr, + affMgr, + ioMgr, + ttlMgr, + evictMgr, + jtaMgr, + storeSesLsnrs, + mvccCachingMgr, + diagnosticMgr + ); + } + + /** */ + public Builder setTxManager(IgniteTxManager txMgr) { + this.txMgr = txMgr; + + return this; + } + + /** */ + public Builder setJtaManager(CacheJtaManagerAdapter jtaMgr) { + this.jtaMgr = jtaMgr; + + return this; + } + + /** */ + public Builder setVersionManager(GridCacheVersionManager verMgr) { + this.verMgr = verMgr; + + return this; + } + + /** */ + public Builder setMvccManager(GridCacheMvccManager mvccMgr) { + this.mvccMgr = mvccMgr; + + return this; + } + + /** */ + public Builder setPageStoreManager(IgnitePageStoreManager pageStoreMgr) { + this.pageStoreMgr = pageStoreMgr; + + return this; + } + + /** */ + public Builder setWalManager(IgniteWriteAheadLogManager walMgr) { + this.walMgr = walMgr; + + return this; + } + + /** */ + public Builder setWalStateManager(WalStateManager walStateMgr) { + this.walStateMgr = walStateMgr; + + return this; + } + + /** */ + public Builder setDatabaseManager(IgniteCacheDatabaseSharedManager dbMgr) { + this.dbMgr = dbMgr; + + return this; + } + + /** */ + public Builder setSnapshotManager(IgniteSnapshotManager snapshotMgr) { + this.snapshotMgr = snapshotMgr; + + return this; + } + + /** */ + public Builder setDeploymentManager(GridCacheDeploymentManager depMgr) { + this.depMgr = depMgr; + + return this; + } + + /** */ + public Builder setPartitionExchangeManager(GridCachePartitionExchangeManager exchMgr) { + this.exchMgr = exchMgr; + + return this; + } + + /** */ + public Builder setAffinityManager(CacheAffinitySharedManager affMgr) { + this.affMgr = affMgr; + + return this; + } + + /** */ + public Builder setIoManager(GridCacheIoManager ioMgr) { + this.ioMgr = ioMgr; + + return this; + } + + /** */ + public Builder setTtlCleanupManager(GridCacheSharedTtlCleanupManager ttlMgr) { + this.ttlMgr = ttlMgr; + + return this; + } + + /** */ + public Builder setPartitionsEvictManager(PartitionsEvictManager evictMgr) { + this.evictMgr = evictMgr; + + return this; + } + + /** */ + public Builder setMvccCachingManager(MvccCachingManager mvccCachingMgr) { + this.mvccCachingMgr = mvccCachingMgr; + + return this; + } + + /** */ + public Builder setDiagnosticManager(CacheDiagnosticManager diagnosticMgr) { + this.diagnosticMgr = diagnosticMgr; + + return this; + } + } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java index 9776948fc4c7d..7e0dac69069cd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java @@ -2642,10 +2642,7 @@ public GridCloseableIterator partitionRowIterator(GridKernalContex CacheObjectContext coctx = new CacheObjectContext(ctx, grpName, null, false, false, false, false, false); - GridCacheSharedContext sctx = new GridCacheSharedContext<>(ctx, null, null, null, - null, null, null, null, null, - null, null, null, null, null, - null, null, null, null, null); + GridCacheSharedContext sctx = GridCacheSharedContext.builder().build(ctx, null); return new DataPageIterator(sctx, coctx, pageStore, partId); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java index 931ac80e245f8..b5454ee98f020 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/IgniteWalIteratorFactory.java @@ -412,12 +412,9 @@ private FileDescriptor readFileDescriptor(File file, FileIOFactory ioFactory) { dbMgr.setPageSize(iteratorParametersBuilder.pageSize); - return new GridCacheSharedContext<>( - kernalCtx, null, null, null, - null, null, null, dbMgr, null, - null, null, null, null, null, - null, null, null, null, null - ); + return GridCacheSharedContext.builder() + .setDatabaseManager(dbMgr) + .build(kernalCtx, null); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java index 5e7c1a19dd36b..b34919d697ec0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalIteratorSwitchSegmentTest.java @@ -159,30 +159,13 @@ private void checkInvariantSwitchSegmentSize(int serVer) throws Exception { }; RecordSerializer serializer = new RecordSerializerFactoryImpl( - new GridCacheSharedContext<>( - kctx, - null, - null, - null, - null, - null, - null, - new IgniteCacheDatabaseSharedManager(kctx) { + GridCacheSharedContext.builder() + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(kctx) { @Override public int pageSize() { return DataStorageConfiguration.DFLT_PAGE_SIZE; } - }, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null) + }) + .build(kctx, null) ).createSerializer(serVer); SwitchSegmentRecord switchSegmentRecord = new SwitchSegmentRecord(); @@ -457,27 +440,12 @@ private T2 initiate( GridTestUtils.setFieldValue(walMgr, "serializerVer", serVer); - GridCacheSharedContext ctx = new GridCacheSharedContext<>( - kctx, - null, - null, - null, - null, - walMgr, - new WalStateManager(kctx), - new GridCacheDatabaseSharedManager(kctx), - null, - null, - null, - null, - new GridCacheIoManager(), - null, - null, - null, - null, - null, - null - ); + GridCacheSharedContext ctx = GridCacheSharedContext.builder() + .setWalManager(walMgr) + .setWalStateManager(new WalStateManager(kctx)) + .setDatabaseManager(new GridCacheDatabaseSharedManager(kctx)) + .setIoManager(new GridCacheIoManager()) + .build(kctx, null); walMgr.start(ctx); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java index 54f8e134fa156..5e9dde2171d6a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreePageMemoryImplTest.java @@ -76,27 +76,12 @@ public class BPlusTreePageMemoryImplTest extends BPlusTreeSelfTest { cctx.add(new GridMetricManager(cctx)); cctx.add(new GridSystemViewManager(cctx)); - GridCacheSharedContext sharedCtx = new GridCacheSharedContext<>( - cctx, - null, - null, - null, - new NoOpPageStoreManager(), - new NoOpWALManager(), - null, - new IgniteCacheDatabaseSharedManager(cctx), - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - new CacheDiagnosticManager() - ); + GridCacheSharedContext sharedCtx = GridCacheSharedContext.builder() + .setPageStoreManager(new NoOpPageStoreManager()) + .setWalManager(new NoOpWALManager()) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(cctx)) + .setDiagnosticManager(new CacheDiagnosticManager()) + .build(cctx, null); IgniteOutClosure clo = new IgniteOutClosure() { @Override public CheckpointProgress apply() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java index e1618b665e876..ba575a9562752 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/BPlusTreeReuseListPageMemoryImplTest.java @@ -75,27 +75,11 @@ public class BPlusTreeReuseListPageMemoryImplTest extends BPlusTreeReuseSelfTest cctx.add(new GridMetricManager(cctx)); cctx.add(new GridSystemViewManager(cctx)); - GridCacheSharedContext sharedCtx = new GridCacheSharedContext<>( - cctx, - null, - null, - null, - new NoOpPageStoreManager(), - new NoOpWALManager(), - null, - new IgniteCacheDatabaseSharedManager(cctx), - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null - ); + GridCacheSharedContext sharedCtx = GridCacheSharedContext.builder() + .setPageStoreManager(new NoOpPageStoreManager()) + .setWalManager(new NoOpWALManager()) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(cctx)) + .build(cctx, null); IgniteOutClosure clo = new IgniteOutClosure() { @Override public CheckpointProgress apply() { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java index ff47f6fe4bbf5..ab93b245fb653 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/IndexStoragePageMemoryImplTest.java @@ -91,27 +91,12 @@ public class IndexStoragePageMemoryImplTest extends IndexStorageSelfTest { cctx.add(new GridMetricManager(cctx)); cctx.add(new GridSystemViewManager(cctx)); - GridCacheSharedContext sharedCtx = new GridCacheSharedContext<>( - cctx, - null, - null, - null, - new NoOpPageStoreManager(), - new NoOpWALManager(), - null, - new IgniteCacheDatabaseSharedManager(cctx), - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - new CacheDiagnosticManager() - ); + GridCacheSharedContext sharedCtx = GridCacheSharedContext.builder() + .setPageStoreManager(new NoOpPageStoreManager()) + .setWalManager(new NoOpWALManager()) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(cctx)) + .setDiagnosticManager(new CacheDiagnosticManager()) + .build(cctx, null); IgniteOutClosure clo = () -> Mockito.mock(CheckpointProgressImpl.class); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java index 7ad03e3343188..927c9ac0e8562 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplNoLoadTest.java @@ -80,27 +80,11 @@ public class PageMemoryImplNoLoadTest extends PageMemoryNoLoadSelfTest { cctx.add(new GridMetricManager(cctx)); cctx.add(new GridSystemViewManager(cctx)); - GridCacheSharedContext sharedCtx = new GridCacheSharedContext<>( - cctx, - null, - null, - null, - new NoOpPageStoreManager(), - new NoOpWALManager(), - null, - new IgniteCacheDatabaseSharedManager(cctx), - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null - ); + GridCacheSharedContext sharedCtx = GridCacheSharedContext.builder() + .setPageStoreManager(new NoOpPageStoreManager()) + .setWalManager(new NoOpWALManager()) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(cctx)) + .build(cctx, null); IgniteOutClosure clo = () -> Mockito.mock(CheckpointProgressImpl.class); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java index ff2c3c439c5a6..c71f81b4c292a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImplTest.java @@ -611,27 +611,11 @@ private PageMemoryImpl createPageMemory( kernalCtx.add(failureProc); - GridCacheSharedContext sharedCtx = new GridCacheSharedContext<>( - kernalCtx, - null, - null, - null, - mgr, - new NoOpWALManager(), - null, - new IgniteCacheDatabaseSharedManager(kernalCtx), - null, - null, - null, - null, - null, - null, - null, - null, - null, - null, - null - ); + GridCacheSharedContext sharedCtx = GridCacheSharedContext.builder() + .setPageStoreManager(mgr) + .setWalManager(new NoOpWALManager()) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(kernalCtx)) + .build(kernalCtx, null); CheckpointProgressImpl cl0 = Mockito.mock(CheckpointProgressImpl.class); diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java index 4bf824701b4fe..33e2fb5b80f63 100644 --- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java +++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java @@ -64,27 +64,21 @@ public class GridCacheTestContext extends GridCacheContext { public GridCacheTestContext(GridTestKernalContext ctx) throws Exception { super( ctx, - new GridCacheSharedContext<>( - ctx, - new IgniteTxManager(), - new GridCacheVersionManager(), - new GridCacheMvccManager(), - null, - null, - new WalStateManager(null), - new IgniteCacheDatabaseSharedManager(ctx), - null, - new GridCacheDeploymentManager(), - new GridCachePartitionExchangeManager(), - new CacheAffinitySharedManager(), - new GridCacheIoManager(), - new GridCacheSharedTtlCleanupManager(), - new PartitionsEvictManager(), - new CacheNoopJtaManager(), - null, - null, - new CacheDiagnosticManager() - ), + GridCacheSharedContext.builder() + .setTxManager(new IgniteTxManager()) + .setVersionManager(new GridCacheVersionManager()) + .setMvccManager(new GridCacheMvccManager()) + .setWalStateManager(new WalStateManager(null)) + .setDatabaseManager(new IgniteCacheDatabaseSharedManager(ctx)) + .setDeploymentManager(new GridCacheDeploymentManager()) + .setPartitionExchangeManager(new GridCachePartitionExchangeManager()) + .setAffinityManager(new CacheAffinitySharedManager()) + .setIoManager(new GridCacheIoManager()) + .setTtlCleanupManager(new GridCacheSharedTtlCleanupManager()) + .setPartitionsEvictManager(new PartitionsEvictManager()) + .setJtaManager(new CacheNoopJtaManager()) + .setDiagnosticManager(new CacheDiagnosticManager()) + .build(ctx, null), defaultCacheConfiguration(), null, CacheType.USER,