#ignite-333: Add methods to cache proxy
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/13f15f6d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/13f15f6d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/13f15f6d Branch: refs/heads/ignite-333 Commit: 13f15f6dc33499c1fc9619fd952bc396073f2282 Parents: 92b2327 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Thu Mar 12 16:06:22 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Thu Mar 12 16:06:22 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheProxyImpl.java | 60 ++++++++++++++++++++ 1 file changed, 60 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13f15f6d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java index 4a1f83c..6d1b58d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java @@ -1264,6 +1264,30 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali } /** {@inheritDoc} */ + @Override public IgniteInternalFuture<?> clearAsync(K key) { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + return delegate.clearAsync(key); + } + finally { + gate.leave(prev); + } + } + + /** {@inheritDoc} */ + @Override public IgniteInternalFuture<?> clearAsync(Set<K> keys) { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + return delegate.clearAsync(keys); + } + finally { + gate.leave(prev); + } + } + + /** {@inheritDoc} */ @Override public void clear(long timeout) throws IgniteCheckedException { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); @@ -1288,6 +1312,42 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali } /** {@inheritDoc} */ + @Override public void clearLocally(Set<K> keys) { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + delegate.clearLocally(keys); + } + finally { + gate.leave(prev); + } + } + + /** {@inheritDoc} */ + @Override public void clear(K key) throws IgniteCheckedException { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + delegate.clear(key); + } + finally { + gate.leave(prev); + } + } + + /** {@inheritDoc} */ + @Override public void clear(Set<K> keys) throws IgniteCheckedException { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + delegate.clear(keys); + } + finally { + gate.leave(prev); + } + } + + /** {@inheritDoc} */ @Nullable @Override public V remove(K key, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException { GridCacheProjectionImpl<K, V> prev = gate.enter(prj);