/** {@inheritDoc} */ @Override public void clear(int cacheId) throws IgniteCheckedException { CacheDataStore delegate0 = init0(true); if (delegate0 == null) return; ctx.database().checkpointReadLock(); try { // Clear persistent pendingTree if (pendingTree != null) { PendingRow row = new PendingRow(cacheId); GridCursor<PendingRow> cursor = pendingTree.find(row, row, PendingEntriesTree.WITHOUT_KEY); while (cursor.next()) { PendingRow row0 = cursor.get(); assert row0.link != 0 : row; boolean res = pendingTree.removex(row0); assert res; } } delegate0.clear(cacheId); } finally { ctx.database().checkpointReadUnlock(); } }
/** * @param cacheId Cache ID. */ private void removeCacheData(int cacheId) { assert grp.affinityNode(); try { if (grp.sharedGroup()) { assert cacheId != CU.UNDEFINED_CACHE_ID; for (CacheDataStore store : cacheDataStores()) store.clear(cacheId); // Clear non-persistent pending tree if needed. if (pendingEntries != null) { PendingRow row = new PendingRow(cacheId); GridCursor<PendingRow> cursor = pendingEntries.find(row, row, PendingEntriesTree.WITHOUT_KEY); while (cursor.next()) { boolean res = pendingEntries.removex(cursor.get()); assert res; } } } } catch (IgniteCheckedException e) { throw new IgniteException(e.getMessage(), e); } }
/** {@inheritDoc} */ @Override public void clear(int cacheId) throws IgniteCheckedException { CacheDataStore delegate0 = init0(true); if (delegate0 == null) return; ctx.database().checkpointReadLock(); try { // Clear persistent pendingTree if (pendingTree != null) { PendingRow row = new PendingRow(cacheId); GridCursor<PendingRow> cursor = pendingTree.find(row, row, PendingEntriesTree.WITHOUT_KEY); while (cursor.next()) { PendingRow row0 = cursor.get(); assert row0.link != 0 : row; boolean res = pendingTree.removex(row0); assert res; } } delegate0.clear(cacheId); } finally { ctx.database().checkpointReadUnlock(); } }
/** * @param cacheId Cache ID. */ private void removeCacheData(int cacheId) { assert grp.affinityNode(); try { if (grp.sharedGroup()) { assert cacheId != CU.UNDEFINED_CACHE_ID; for (CacheDataStore store : cacheDataStores()) store.clear(cacheId); // Clear non-persistent pending tree if needed. if (pendingEntries != null) { PendingRow row = new PendingRow(cacheId); GridCursor<PendingRow> cursor = pendingEntries.find(row, row, PendingEntriesTree.WITHOUT_KEY); while (cursor.next()) { boolean res = pendingEntries.removex(cursor.get()); assert res; } } } } catch (IgniteCheckedException e) { throw new IgniteException(e.getMessage(), e); } }