コード例 #1
0
  /** @throws Exception If failed. */
  public void testNotReuseCache() throws Exception {
    CollectionConfiguration colCfg1 = collectionConfiguration();

    CollectionConfiguration colCfg2 = collectionConfiguration();

    if (colCfg2.getAtomicityMode() == ATOMIC) colCfg2.setAtomicityMode(TRANSACTIONAL);
    else colCfg2.setAtomicityMode(ATOMIC);

    IgniteQueue queue1 = grid(0).queue("Queue1", 0, colCfg1);

    IgniteQueue queue2 = grid(0).queue("Queue2", 0, colCfg2);

    assertNotSame(getQueueCache(queue1), getQueueCache(queue2));
  }
コード例 #2
0
 @SuppressWarnings("rawtypes")
 private static IgniteSet initializeSet(Ignite ignite) throws IgniteException {
   log.info("initializing distributed dataset: " + JOB_SCHEDULE_DATA_SET_NAME);
   CollectionConfiguration setCfg = new CollectionConfiguration();
   setCfg.setAtomicityMode(TRANSACTIONAL);
   setCfg.setCacheMode(REPLICATED);
   IgniteSet<ScheduledRunnable> set = ignite.set(JOB_SCHEDULE_DATA_SET_NAME, setCfg);
   return set;
 }