You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/07/09 16:28:00 UTC
[1/2] incubator-ignite git commit: # IGNITE-1097 Wrap
RuntimeException to GridClosureException.
Repository: incubator-ignite
Updated Branches:
refs/heads/ignite-1097 b131c81bf -> 2074f70df
# IGNITE-1097 Wrap RuntimeException to GridClosureException.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6831b30a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6831b30a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6831b30a
Branch: refs/heads/ignite-1097
Commit: 6831b30a7860503b42767123604d2ecf374f0c3e
Parents: b131c81
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:25:42 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Thu Jul 9 17:25:42 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheProxy.java | 29 ++++++++++++++++----
1 file changed, 23 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6831b30a/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 b31b2e8..00fc0f9 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
@@ -28,6 +28,7 @@ import org.apache.ignite.internal.processors.cache.query.*;
import org.apache.ignite.internal.processors.query.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.internal.util.future.*;
+import org.apache.ignite.internal.util.lang.*;
import org.apache.ignite.internal.util.tostring.*;
import org.apache.ignite.internal.util.typedef.*;
import org.apache.ignite.internal.util.typedef.internal.*;
@@ -884,7 +885,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
IgniteInternalFuture<Void> fut0 = fut.chain(new CX1<IgniteInternalFuture<Boolean>, Void>() {
@Override public Void applyx(IgniteInternalFuture<Boolean> fut) throws IgniteCheckedException {
- fut.get();
+ try {
+ fut.get();
+ }
+ catch (RuntimeException e) {
+ throw new GridClosureException(e);
+ }
return null;
}
@@ -1238,9 +1244,14 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
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;
+ try {
+ EntryProcessorResult<T> res = fut.get();
+
+ return res != null ? res.get() : null;
+ }
+ catch (RuntimeException e) {
+ throw new GridClosureException(e);
+ }
}
});
@@ -1276,9 +1287,15 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
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;
+ try {
+ EntryProcessorResult<T> res = fut.get();
+
+ return res != null ? res.get() : null;
+ }
+ catch (RuntimeException e) {
+ throw new GridClosureException(e);
+ }
}
});
[2/2] incubator-ignite git commit: IGNITE-1097 Remove duplicated
method.
Posted by se...@apache.org.
IGNITE-1097 Remove duplicated method.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2074f70d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2074f70d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2074f70d
Branch: refs/heads/ignite-1097
Commit: 2074f70dfd28322779233ee11a10c36c4c0cd071
Parents: 6831b30
Author: sevdokimov <se...@jetbrains.com>
Authored: Thu Jul 9 17:27:54 2015 +0300
Committer: sevdokimov <se...@jetbrains.com>
Committed: Thu Jul 9 17:27:54 2015 +0300
----------------------------------------------------------------------
.../processors/cache/IgniteCacheProxy.java | 40 +-------------------
1 file changed, 1 insertion(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2074f70d/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 00fc0f9..1acd49f 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
@@ -1277,45 +1277,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
/** {@inheritDoc} */
@Override public <T> T invoke(K key, CacheEntryProcessor<K, V, T> entryProcessor, Object... args)
throws EntryProcessorException {
- try {
- CacheOperationContext prev = onEnter(opCtx);
-
- 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 {
-
- try {
- EntryProcessorResult<T> res = fut.get();
-
- return res != null ? res.get() : null;
- }
- catch (RuntimeException e) {
- throw new GridClosureException(e);
- }
- }
- });
-
- setFuture(fut0);
-
- return null;
- }
- else {
- EntryProcessorResult<T> res = delegate.invoke(key, entryProcessor, args);
-
- return res != null ? res.get() : null;
- }
- }
- finally {
- onLeave(prev);
- }
- }
- catch (IgniteCheckedException e) {
- throw cacheException(e);
- }
+ return invoke(key, (EntryProcessor<K, V, T>)entryProcessor, args);
}
/** {@inheritDoc} */