/** */ private static Optional<IgniteCacheOffheapManager.CacheDataStore> dataStore( GridCacheContext<?, ?> cctx, Object key) { int p = cctx.affinity().partition(key); IgniteCacheOffheapManager offheap = cctx.offheap(); return StreamSupport.stream(offheap.cacheDataStores().spliterator(), false) .filter(ds -> ds.partId() == p) .findFirst(); } }
GridIterator<CacheDataRow> it = grpCtx.offheap().partitionIterator(part.id());
/** {@inheritDoc} */ @Override public void updateIndex(SchemaIndexCacheFilter filter, SchemaIndexCacheVisitorClosure clo) throws IgniteCheckedException, GridCacheEntryRemovedException { lockEntry(); try { if (isInternal()) return; checkObsolete(); CacheDataRow row = cctx.offheap().read(this); if (row != null && (filter == null || filter.apply(row))) clo.apply(row); } finally { unlockEntry(); } }
tblName, tbl.cacheName(), cctx.offheap().reuseListForIndex(treeName), cctx.groupId(), cctx.dataRegion().pageMemory(), cctx.shared().wal(), cctx.offheap().globalRemoveId(), tbl.rowFactory(), page.pageId().pageId(),
List<IgniteBiTuple<Object, MvccVersion>> vers = cctx.offheap().mvccAllVersions(cctx, key0); CacheDataRow row = cctx.offheap().read(cctx, key0); new MvccSnapshotWithoutTxs(cntr.coordinatorVersion(), cntr.counter(), Integer.MAX_VALUE, 0); row = cctx.offheap().mvccRead(cctx, key0, readVer); cctx.offheap().mvccRead(cctx, key0, version(vers.get(0).get2().coordinatorVersion() + 1, 1)), key0, val); cctx.offheap().mvccRead(cctx, key0, version(vers.get(0).get2().coordinatorVersion(), vers.get(0).get2().counter() + 1)), key0, val); row = cctx.offheap().mvccRead(cctx, key0, ver); cctx.offheap().mvccRemoveAll((GridCacheMapEntry)cctx.cache().entryEx(key));
/** {@inheritDoc} */ @Override public long localSizeLong(CachePeekMode[] peekModes) throws IgniteCheckedException { PeekModes modes = parsePeekModes(peekModes, true); modes.primary = true; modes.backup = true; if (modes.offheap) return ctx.offheap().cacheEntriesCount(ctx.cacheId()); else if (modes.heap) return size(); else return 0; }
/** * TODO: IGNITE-3500: do we need to generate event and invalidate value? * * @return {@code true} if expired. * @throws IgniteCheckedException In case of failure. */ private boolean checkExpired() throws IgniteCheckedException { assert lock.isHeldByCurrentThread(); long expireTime = expireTimeExtras(); if (expireTime > 0) { long delta = expireTime - U.currentTimeMillis(); if (delta <= 0) { if (cctx.mvccEnabled()) cctx.offheap().mvccRemoveAll(this); else removeValue(); return true; } } return false; }
iter = grp.offheap().rebalanceIterator(demandMsg.partitions(), demandMsg.topologyVersion()); : "Partition should be in OWNING state: " + loc; supplyMsg.addEstimatedKeysCount(grp.offheap().totalPartitionEntriesCount(part));
pageMem, grp.dataRegion().config().isPersistenceEnabled() ? grp.shared().wal() : null, grp.offheap().globalRemoveId(), metaPageId, reuseList,
cctx.offheap().mvccInitialValue(this, ret, nextVer, expTime); else storeValue(ret, expTime, nextVer); cctx.offheap().mvccRemoveAll(this); else removeValue();
CacheDataRow row = cctx.offheap().mvccRead(cctx, key, mvccVer); cctx.offheap().mvccInitialValue(this, ret, nextVer, expTime); else storeValue(ret, expTime, nextVer);
/** {@inheritDoc} */ @Nullable @Override public CacheObject mvccPeek(boolean onheapOnly) throws GridCacheEntryRemovedException, IgniteCheckedException { if (onheapOnly) return null; lockEntry(); try { checkObsolete(); CacheDataRow row = cctx.offheap().mvccRead(cctx, key, MVCC_MAX_SNAPSHOT); return row != null ? row.value() : null; } finally { unlockEntry(); } }
map.addHistorical(0, i, Long.MAX_VALUE, entries); try (IgniteRebalanceIterator it = offh.rebalanceIterator(map, topVer)) { assertNotNull(it); map.addHistorical(1, i, Long.MAX_VALUE, entries); try (IgniteRebalanceIterator it = offh.rebalanceIterator(map, topVer)) { assertNotNull(it); map.addHistorical(0, i, Long.MAX_VALUE, entries); try (IgniteRebalanceIterator it = offh.rebalanceIterator(map, topVer)) { long end = System.currentTimeMillis(); map.addHistorical(1, i, Long.MAX_VALUE, entries); try (IgniteRebalanceIterator it = offh.rebalanceIterator(map, topVer)) { assertNotNull(it);
/** {@inheritDoc} */ @Override public long offHeapEntriesCount() { try { IgniteCacheOffheapManager mgr = ctx.offheap(); return mgr != null ? mgr.cacheEntriesCount(ctx.cacheId(), true, true, ctx.affinity().affinityTopologyVersion()) : -1; } catch (IgniteCheckedException ignore) { return 0; } }
cctx.offheap().mvccRemoveAll(this); else removeValue();
tblName, tbl.cacheName(), cctx.offheap().reuseListForIndex(treeName), cctx.groupId(), cctx.dataRegion().pageMemory(), cctx.shared().wal(), cctx.offheap().globalRemoveId(), tbl.rowFactory(), page.pageId().pageId(),
iter = grp.offheap().rebalanceIterator(demandMsg.partitions(), demandMsg.topologyVersion()); : "Partition should be in OWNING state: " + loc; supplyMsg.addEstimatedKeysCount(grp.offheap().totalPartitionEntriesCount(part));
grp.dataRegion().pageMemory(), grp.dataRegion().config().isPersistenceEnabled() ? grp.shared().wal() : null, grp.offheap().globalRemoveId(), metaPageId, reuseList,