本文整理汇总了Java中org.apache.ignite.cache.CacheMode.PARTITIONED属性的典型用法代码示例。如果您正苦于以下问题:Java CacheMode.PARTITIONED属性的具体用法?Java CacheMode.PARTITIONED怎么用?Java CacheMode.PARTITIONED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.ignite.cache.CacheMode
的用法示例。
在下文中一共展示了CacheMode.PARTITIONED属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testNoStoreNearDisabled
/**
* @throws Exception If failed.
*/
public void testNoStoreNearDisabled() throws Exception {
nearEnabled = false;
cacheMode = CacheMode.PARTITIONED;
factory = new Factory1();
startGrids(2);
doTestNoStore();
}
示例2: cacheMode
/** {@inheritDoc} */
@Override protected CacheMode cacheMode() {
return CacheMode.PARTITIONED;
}
示例3: getCacheMode
/** {@inheritDoc} */
@Override protected CacheMode getCacheMode() {
return CacheMode.PARTITIONED;
}
示例4: testScanFallbackOnRebalancingCursor1
/**
* Scan should activate fallback mechanism when new nodes join topology and rebalancing happens in parallel with
* scan query.
*
* @throws Exception In case of error.
*/
public void testScanFallbackOnRebalancingCursor1() throws Exception {
cacheMode = CacheMode.PARTITIONED;
clientMode = false;
backups = 1;
commSpiFactory = new TestFallbackOnRebalancingCommunicationSpiFactory();
try {
Ignite ignite = startGrids(GRID_CNT);
fillCache(ignite);
final AtomicBoolean done = new AtomicBoolean(false);
IgniteInternalFuture fut1 = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
for (int i = 0; i < 5; i++) {
startGrid(GRID_CNT + i);
U.sleep(500);
}
done.set(true);
return null;
}
}, 1);
final AtomicInteger nodeIdx = new AtomicInteger();
IgniteInternalFuture fut2 = multithreadedAsync(
new Callable<Object>() {
@Override public Object call() throws Exception {
int nodeId = nodeIdx.getAndIncrement();
IgniteCache<Integer, Integer> cache = grid(nodeId).cache(DEFAULT_CACHE_NAME);
int cntr = 0;
while (!done.get()) {
int part = ThreadLocalRandom.current().nextInt(ignite(nodeId).affinity(DEFAULT_CACHE_NAME).partitions());
if (cntr++ % 100 == 0)
info("Running query [node=" + nodeId + ", part=" + part + ']');
try (QueryCursor<Cache.Entry<Integer, Integer>> cur =
cache.query(new ScanQuery<Integer, Integer>(part).setPageSize(5))) {
doTestScanQueryCursor(cur, part);
}
}
return null;
}
}, GRID_CNT);
fut1.get();
fut2.get();
}
finally {
stopAllGrids();
}
}
示例5: H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest
/**
* Constructor.
*/
public H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest() {
super(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, 0, CLIENT_IDX);
}
开发者ID:apache,项目名称:ignite,代码行数:6,代码来源:H2DynamicIndexingComplexClientAtomicPartitionedNoBackupsTest.java
示例6: cacheMode
/**
* @return {@code LOCAL} for this test.
*/
@Override protected CacheMode cacheMode() {
return CacheMode.PARTITIONED;
}
示例7: H2DynamicIndexingComplexServerTransactionalPartitionedTest
/**
* Constructor.
*/
public H2DynamicIndexingComplexServerTransactionalPartitionedTest() {
super(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, 1, SRV_IDX);
}
开发者ID:apache,项目名称:ignite,代码行数:6,代码来源:H2DynamicIndexingComplexServerTransactionalPartitionedTest.java
示例8: testQueueConstantMultipleTopologyChange
/**
* @throws Exception If failed.
*/
public void testQueueConstantMultipleTopologyChange() throws Exception {
int topChangeThreads = collectionCacheMode() == CacheMode.PARTITIONED ? 1 : TOP_CHANGE_THREAD_CNT;
doTestQueue(multipleTopologyChangeWorker(topChangeThreads));
}
示例9: H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest
/**
* Constructor.
*/
public H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest() {
super(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, 0, CLIENT_IDX);
}
开发者ID:apache,项目名称:ignite,代码行数:6,代码来源:H2DynamicIndexingComplexClientTransactionalPartitionedNoBackupsTest.java