/** {@inheritDoc} */ @Override public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot) throws IgniteCheckedException { GridCursor<? extends CacheDataRow> cursor; if (mvccSnapshot != null) { assert grp.mvccEnabled(); cursor = dataTree.find(null, null, new MvccFirstVisibleRowTreeClosure(grp.singleCacheContext(), mvccSnapshot), null); } else cursor = dataTree.find(null, null); return cursor; }
/** {@inheritDoc} */ @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x, MvccSnapshot snapshot) throws IgniteCheckedException { SearchRow lowerRow; SearchRow upperRow; if (grp.sharedGroup()) { assert cacheId != CU.UNDEFINED_CACHE_ID; lowerRow = lower != null ? new SearchRow(cacheId, lower) : new SearchRow(cacheId); upperRow = upper != null ? new SearchRow(cacheId, upper) : new SearchRow(cacheId); } else { lowerRow = lower != null ? new SearchRow(CU.UNDEFINED_CACHE_ID, lower) : null; upperRow = upper != null ? new SearchRow(CU.UNDEFINED_CACHE_ID, upper) : null; } GridCursor<? extends CacheDataRow> cursor; if (snapshot != null) { assert grp.mvccEnabled(); GridCacheContext cctx = grp.sharedGroup() ? grp.shared().cacheContext(cacheId) : grp.singleCacheContext(); cursor = dataTree.find(lowerRow, upperRow, new MvccFirstVisibleRowTreeClosure(cctx, snapshot), x); } else cursor = dataTree.find(lowerRow, upperRow, x); return cursor; }
grpCtx.singleCacheContext() : grpCtx.shared().cacheContext(row.cacheId());
GridCacheContext cctx = grp.singleCacheContext();
GridCacheContext cctx = grp.sharedGroup() ? ctx.cacheContext(entry.cacheId()) : grp.singleCacheContext();
/** {@inheritDoc} */ @Override public GridCursor<? extends CacheDataRow> cursor(MvccSnapshot mvccSnapshot) throws IgniteCheckedException { if (mvccSnapshot != null) { assert grp.mvccEnabled(); return dataTree.find(null, null, new MvccFirstVisibleRowTreeClosure(grp.singleCacheContext(), mvccSnapshot), null); } return dataTree.find(null, null); }
/** {@inheritDoc} */ @Override public GridCursor<? extends CacheDataRow> cursor(int cacheId, KeyCacheObject lower, KeyCacheObject upper, Object x, MvccSnapshot snapshot) throws IgniteCheckedException { SearchRow lowerRow; SearchRow upperRow; if (grp.sharedGroup()) { assert cacheId != CU.UNDEFINED_CACHE_ID; lowerRow = lower != null ? new SearchRow(cacheId, lower) : new SearchRow(cacheId); upperRow = upper != null ? new SearchRow(cacheId, upper) : new SearchRow(cacheId); } else { lowerRow = lower != null ? new SearchRow(CU.UNDEFINED_CACHE_ID, lower) : null; upperRow = upper != null ? new SearchRow(CU.UNDEFINED_CACHE_ID, upper) : null; } if (snapshot != null) { assert grp.mvccEnabled(); GridCacheContext cctx = grp.sharedGroup() ? grp.shared().cacheContext(cacheId) : grp.singleCacheContext(); return dataTree.find(lowerRow, upperRow, new MvccFirstVisibleRowTreeClosure(cctx, snapshot), x); } return dataTree.find(lowerRow, upperRow, x); }
grpCtx.singleCacheContext() : grpCtx.shared().cacheContext(row.cacheId());
GridCacheContext cctx = grp.singleCacheContext();
GridCacheContext cctx = grp.sharedGroup() ? ctx.cacheContext(entry.cacheId()) : grp.singleCacheContext();