ds.setRowCacheCleaner(rowCache);
/** * Callback invoked on cache registration within indexing. * * @param cctx Cache context. */ public void onCacheRegistered(GridCacheContext cctx) { if (!cctx.config().isSqlOnheapCacheEnabled()) return; synchronized (mux) { int grpId = cctx.groupId(); if (caches != null) { H2RowCache cache = caches.get(grpId); if (cache != null) { cache.onCacheRegistered(); return; } } HashMap<Integer, H2RowCache> caches0 = copy(); H2RowCache rowCache = new H2RowCache(cctx.group(), cctx.config().getSqlOnheapCacheMaxSize()); caches0.put(grpId, rowCache); caches = caches0; // Inject row cache cleaner into store on cache creation. // Used in case the cache with enabled SqlOnheapCache is created in exists cache group // and SqlOnheapCache is disbaled for the caches have been created before. for (IgniteCacheOffheapManager.CacheDataStore ds : cctx.offheap().cacheDataStores()) ds.setRowCacheCleaner(rowCache); } }
/** {@inheritDoc} */ @Override public void setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner) { try { CacheDataStore delegate0 = init0(true); if (delegate0 != null) delegate0.setRowCacheCleaner(rowCacheCleaner); } catch (IgniteCheckedException e) { throw new IgniteException(e); } }
/** {@inheritDoc} */ @Override public void setRowCacheCleaner(GridQueryRowCacheCleaner rowCacheCleaner) { try { CacheDataStore delegate0 = init0(true); if (delegate0 != null) delegate0.setRowCacheCleaner(rowCacheCleaner); } catch (IgniteCheckedException e) { throw new IgniteException(e); } }