Java Code Examples for org.apache.ignite.cache.CacheMode#PARTITIONED
The following examples show how to use
org.apache.ignite.cache.CacheMode#PARTITIONED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridCacheDhtPreloadMultiThreadedSelfTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = loadConfiguration("modules/core/src/test/config/spring-multicache.xml"); cfg.setGridLogger(getTestResources().getLogger()); cfg.setIgniteInstanceName(igniteInstanceName); cfg.setFailureHandler(new NoOpFailureHandler()); for (CacheConfiguration cCfg : cfg.getCacheConfiguration()) { if (cCfg.getCacheMode() == CacheMode.PARTITIONED) { cCfg.setAffinity(new RendezvousAffinityFunction(2048, null)); cCfg.setBackups(1); } } return cfg; }
Example 2
Source File: CacheClientStoreSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** * @throws Exception If failed. */ @Test public void testNoStoreNearEnabled() throws Exception { nearEnabled = true; cacheMode = CacheMode.PARTITIONED; factory = new Factory1(); startGrids(2); doTestNoStore(); }
Example 3
Source File: CacheScanPartitionQueryFallbackSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** * Scan (with explicit {@code setLocal(true)}) should perform on the local node. * * @throws Exception If failed. */ @Test public void testScanLocalExplicit() throws Exception { cacheMode = CacheMode.PARTITIONED; backups = 0; commSpiFactory = new TestLocalCommunicationSpiFactory(); try { Ignite ignite = startGrids(GRID_CNT); IgniteCacheProxy<Integer, Integer> cache = fillCache(ignite); int part = anyLocalPartition(cache.context()); QueryCursor<Cache.Entry<Integer, Integer>> qry = cache.query(new ScanQuery<Integer, Integer>().setPartition(part).setLocal(true)); doTestScanQuery(qry, part); GridTestUtils.assertThrows(log, (Callable<Void>)() -> { int remPart = remotePartition(cache.context()).getKey(); cache.query(new ScanQuery<Integer, Integer>().setPartition(remPart).setLocal(true)); return null; }, IgniteCheckedException.class, null); } finally { stopAllGrids(); } }
Example 4
Source File: GridCacheReferenceCleanupSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** @throws Exception If failed. */ @Test public void testAtomicLongPartitioned() throws Exception { mode = CacheMode.PARTITIONED; startGrids(2); try { checkReferenceCleanup(atomicLongCallable()); } finally { stopAllGrids(); } }
Example 5
Source File: DynamicEnableIndexingBasicSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** Test parameters. */ @Parameters(name = "hasNear={0},nodeIdx={1},cacheMode={2},atomicityMode={3}") public static Iterable<Object[]> params() { int[] opNodes = new int[] {IDX_CLI, IDX_SRV_CRD, IDX_SRV_NON_CRD, IDX_SRV_FILTERED}; CacheMode[] cacheModes = new CacheMode[] {CacheMode.PARTITIONED, CacheMode.REPLICATED}; CacheAtomicityMode[] atomicityModes = new CacheAtomicityMode[] { CacheAtomicityMode.ATOMIC, CacheAtomicityMode.TRANSACTIONAL, CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT }; List<Object[]> res = new ArrayList<>(); for (int node : opNodes) { for (CacheMode cacheMode : cacheModes) { for (CacheAtomicityMode atomicityMode : atomicityModes) { res.add(new Object[] {true, node, cacheMode, atomicityMode}); // For TRANSACTIONAL_SNAPSHOT near caches is forbidden. if (atomicityMode != CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT) res.add(new Object[] {false, node, cacheMode, atomicityMode}); } } } return res; }
Example 6
Source File: CacheMvccPartitionedCoordinatorFailoverTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 7
Source File: GridCacheAtomicUsersAffinityMapperSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode getCacheMode() { return CacheMode.PARTITIONED; }
Example 8
Source File: IgniteCacheStoreSessionWriteBehindAbstractTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 9
Source File: GridCacheEmptyEntriesPartitionedSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 10
Source File: GridCacheContinuousQueryPartitionTxOneNodeTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 11
Source File: H2DynamicIndexingComplexClientTransactionalPartitionedTest.java From ignite with Apache License 2.0 | 4 votes |
/** * Constructor. */ public H2DynamicIndexingComplexClientTransactionalPartitionedTest() { super(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, 1, CLIENT_IDX); }
Example 12
Source File: IgniteTopologyValidatorPartitionedAtomicCacheGroupsTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 13
Source File: GridCachePartitionedTxOriginatingNodeFailureSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 14
Source File: CacheTtlTransactionalPartitionedSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 15
Source File: CacheMvccContinuousQueryPartitionedTxOneNodeTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 16
Source File: CacheVersionedEntryPartitionedAtomicSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 17
Source File: CacheMvccPartitionedSqlCoordinatorFailoverTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 18
Source File: IgniteExchangeFutureHistoryTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected CacheMode cacheMode() { return CacheMode.PARTITIONED; }
Example 19
Source File: H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest.java From ignite with Apache License 2.0 | 4 votes |
/** * Constructor. */ public H2DynamicIndexingComplexServerAtomicPartitionedNoBackupsTest() { super(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, 0, SRV_IDX); }
Example 20
Source File: H2DynamicIndexingComplexClientAtomicPartitionedTest.java From ignite with Apache License 2.0 | 4 votes |
/** * Constructor. */ public H2DynamicIndexingComplexClientAtomicPartitionedTest() { super(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, 1, CLIENT_IDX); }