/** {@inheritDoc} */ @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException { super.finishUnmarshal(ctx, ldr); if (writes != null) unmarshalTx(writes, false, ctx, ldr); if (reads != null) unmarshalTx(reads, false, ctx, ldr); if (grpLockKeyBytes != null && grpLockKey == null) grpLockKey = ctx.marshaller().unmarshal(grpLockKeyBytes, ldr); if (dhtVerKeys != null && dhtVers == null) { assert dhtVerVals != null; assert dhtVerKeys.size() == dhtVerVals.size(); Iterator<IgniteTxKey> keyIt = dhtVerKeys.iterator(); Iterator<GridCacheVersion> verIt = dhtVerVals.iterator(); dhtVers = U.newHashMap(dhtVerKeys.size()); while (keyIt.hasNext()) { IgniteTxKey key = keyIt.next(); key.finishUnmarshal(ctx.cacheContext(key.cacheId()), ldr); dhtVers.put(key, verIt.next()); } } if (txNodesBytes != null) txNodes = ctx.marshaller().unmarshal(txNodesBytes, ldr); }
/** * Checks that cache is empty. * * @param cache Cache to check. * @throws org.apache.ignite.internal.IgniteInterruptedCheckedException If interrupted while * sleeping. */ @SuppressWarnings({"ErrorNotRethrown", "TypeMayBeWeakened"}) private void checkEmpty(IgniteCache<String, String> cache) throws IgniteInterruptedCheckedException { for (int i = 0; i < 3; i++) { try { assertTrue(!cache.iterator().hasNext()); break; } catch (AssertionError e) { if (i == 2) throw e; info(">>> Cache is not empty, flushing evictions."); U.sleep(1000); } } }