/** * @param gate Cache gateway. */ private void onLeave(GridCacheGateway<K, V> gate) { if (lock) gate.leave(); else gate.leaveNoLock(); }
/** {@inheritDoc} */ @Override public void localLoadCache(IgniteBiPredicate<K, V> p, @Nullable Object[] args) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.localLoadCache(p, args); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public Map<K, V> getAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getAll(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<Collection<CacheEntry<K, V>>> getEntriesAsync( @Nullable Collection<? extends K> keys) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getEntriesAsync(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public void putAll(@Nullable Map<? extends K, ? extends V> m) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.putAll(m); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> removeAllAsync(@Nullable Collection<? extends K> keys) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.removeAllAsync(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean lockAll(@Nullable Collection<? extends K> keys, long timeout) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.lockAll(keys, timeout); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public CacheMetrics clusterMetrics() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.clusterMetrics(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean localPreloadPartition(int part) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.localPreloadPartition(part); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAsync(K key) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getAsync(key); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<V> getAndPutIfAbsentAsync(K key, V val) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getAndPutIfAbsentAsync(key, val); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.putIfAbsent(key, val); } finally { gate.leave(prev); } }
/** {@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 IgniteInternalFuture<?> clearAllAsync(Set<? extends K> keys) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.clearAllAsync(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean lock(K key, long timeout) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.lock(key, timeout); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public long sizeLong() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.sizeLong(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public int size(CachePeekMode[] peekModes) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.size(peekModes); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public long primarySizeLong() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.primarySizeLong(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public long offHeapAllocatedSize() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.offHeapAllocatedSize(); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> rebalance() { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.rebalance(); } finally { gate.leave(prev); } }