Repository: incubator-ignite Updated Branches: refs/heads/ignite-326 2ff5cfe3f -> be4881b58
IGNITE-326 Fixed review notes. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/be4881b5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/be4881b5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/be4881b5 Branch: refs/heads/ignite-326 Commit: be4881b586ff331261f73812dc72fbf29c240749 Parents: 2ff5cfe Author: nikolay_tikhonov <ntikho...@gridgain.com> Authored: Wed Feb 25 10:57:24 2015 +0300 Committer: nikolay_tikhonov <ntikho...@gridgain.com> Committed: Wed Feb 25 10:57:24 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/IgniteCacheProxy.java | 57 ++------------------ 1 file changed, 3 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be4881b5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index 4101a26..a716fc8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -1099,41 +1099,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V } /** {@inheritDoc} */ - @Override public <T> T invoke(K key, IgniteEntryProcessor<K, V, T> entryProcessor, Object... args) - throws EntryProcessorException { - try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); - - try { - if (isAsync()) { - IgniteInternalFuture<EntryProcessorResult<T>> fut = delegate.invokeAsync(key, entryProcessor, args); - - IgniteInternalFuture<T> fut0 = fut.chain(new CX1<IgniteInternalFuture<EntryProcessorResult<T>>, T>() { - @Override public T applyx(IgniteInternalFuture<EntryProcessorResult<T>> fut) - throws IgniteCheckedException { - EntryProcessorResult<T> res = fut.get(); - - return res != null ? res.get() : null; - } - }); - - setFuture(fut0); - - return null; - } - else { - EntryProcessorResult<T> res = delegate.invoke(key, entryProcessor, args); - - return res != null ? res.get() : null; - } - } - finally { - gate.leave(prev); - } - } - catch (IgniteCheckedException e) { - throw cacheException(e); - } + @Override public <T> T invoke(K key, IgniteEntryProcessor<K, V, T> entryProcessor, Object... args) { + return invoke(key, (EntryProcessor<K, V, T>)entryProcessor, args); } /** {@inheritDoc} */ @@ -1165,25 +1132,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V @Override public <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, IgniteEntryProcessor<K, V, T> entryProcessor, Object... args) { - try { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); - - try { - if (isAsync()) { - setFuture(delegate.invokeAllAsync(keys, entryProcessor, args)); - - return null; - } - else - return delegate.invokeAll(keys, entryProcessor, args); - } - finally { - gate.leave(prev); - } - } - catch (IgniteCheckedException e) { - throw cacheException(e); - } + return invokeAll(keys, (EntryProcessor<K, V, T>)entryProcessor, args); } /** {@inheritDoc} */