/** {@inheritDoc} */ @Override public Iterable<Cache.Entry<Object, Object>> localEntries( CachePeekMode[] peekModes ) throws IgniteCheckedException { return delegate.get().localEntries(peekModes); }
/** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.localEntries(peekModes); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { return delegate.localEntries(peekModes); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** * @param setId Set ID. * @param topVer Topology version. * @throws IgniteCheckedException If failed. */ private void removeSetData(IgniteUuid setId, AffinityTopologyVersion topVer) throws IgniteCheckedException { boolean loc = cctx.isLocal(); GridCacheAffinityManager aff = cctx.affinity(); if (!loc) { aff.affinityReadyFuture(topVer).get(); cctx.preloader().syncFuture().get(); } IgniteInternalCache<?, ?> cache = cctx.cache(); final int BATCH_SIZE = 100; Collection<SetItemKey> keys = new ArrayList<>(BATCH_SIZE); for (Cache.Entry entry : cache.localEntries(new CachePeekMode[] {CachePeekMode.PRIMARY})) { Object obj = entry.getKey(); if (!(obj instanceof SetItemKey && setId.equals(((SetItemKey)obj).setId()))) continue; keys.add((SetItemKey)obj); if (keys.size() == BATCH_SIZE) { retryRemoveAll(cache, keys); keys.clear(); } } if (!keys.isEmpty()) retryRemoveAll(cache, keys); }
entries = jobMetaCache().localEntries(OFFHEAP_PEEK_MODE);
/** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException { try { return delegate.localEntries(peekModes); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.localEntries(peekModes); } finally { gate.leave(prev); } }
/** * @param setId Set ID. * @param topVer Topology version. * @throws IgniteCheckedException If failed. */ @SuppressWarnings("unchecked") private void removeSetData(IgniteUuid setId, AffinityTopologyVersion topVer) throws IgniteCheckedException { boolean loc = cctx.isLocal(); GridCacheAffinityManager aff = cctx.affinity(); if (!loc) { aff.affinityReadyFuture(topVer).get(); cctx.preloader().syncFuture().get(); } IgniteInternalCache<?, ?> cache = cctx.cache(); final int BATCH_SIZE = 100; Collection<SetItemKey> keys = new ArrayList<>(BATCH_SIZE); for (Cache.Entry entry : cache.localEntries(new CachePeekMode[] {CachePeekMode.PRIMARY})) { Object obj = entry.getKey(); if (!(obj instanceof SetItemKey && setId.equals(((SetItemKey)obj).setId()))) continue; keys.add((SetItemKey)obj); if (keys.size() == BATCH_SIZE) { retryRemoveAll(cache, keys); keys.clear(); } } if (!keys.isEmpty()) retryRemoveAll(cache, keys); }