You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/08 12:32:08 UTC

[1/3] ignite git commit: IGNITE-1388 Platform .Net: cache.Invoke result in async mode should have an error flag

Repository: ignite
Updated Branches:
  refs/heads/ignite-1.4 a91f386e1 -> b2b6ce6c2


IGNITE-1388 Platform .Net: cache.Invoke result in async mode should have an error flag


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/57555af6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/57555af6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/57555af6

Branch: refs/heads/ignite-1.4
Commit: 57555af62c93bdc8e012c1be7b6c6edd4d9d2ebe
Parents: 2326bb5
Author: ptupitsyn <pt...@gridgain.com>
Authored: Tue Sep 8 13:25:18 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Tue Sep 8 13:25:18 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/cache/PlatformCache.java       | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/57555af6/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 27af344..0829617 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -984,14 +984,21 @@ public class PlatformCache extends PlatformAbstractTarget {
     private static class EntryProcessorExceptionWriter implements PlatformFutureUtils.Writer {
         /** <inheritDoc /> */
         @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
-            EntryProcessorException entryEx = (EntryProcessorException) err;
+            if (err == null) {
+                writer.writeBoolean(true);  // success
 
-            writeError(writer, entryEx);
+                writer.writeObjectDetached(obj);
+            }
+            else {
+                writer.writeBoolean(false);  // failure
+
+                writeError(writer, (Exception) err);
+            }
         }
 
         /** <inheritDoc /> */
         @Override public boolean canWrite(Object obj, Throwable err) {
-            return err instanceof EntryProcessorException;
+            return true;
         }
     }
 


[2/3] ignite git commit: Merge branch 'ignite-1388' of https://github.com/ptupitsyn/ignite into ignite-1.4

Posted by vo...@apache.org.
Merge branch 'ignite-1388' of https://github.com/ptupitsyn/ignite into ignite-1.4


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4dc4171b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4dc4171b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4dc4171b

Branch: refs/heads/ignite-1.4
Commit: 4dc4171b666e0515ef657572352b6c53bf503a17
Parents: a91f386 57555af
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 8 13:28:37 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 8 13:28:37 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/cache/PlatformCache.java       | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[3/3] ignite git commit: IGNITE-1388: Minor refactoring for platform invoke/invokeAll.

Posted by vo...@apache.org.
IGNITE-1388: Minor refactoring for platform invoke/invokeAll.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b2b6ce6c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b2b6ce6c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b2b6ce6c

Branch: refs/heads/ignite-1.4
Commit: b2b6ce6c22734a47d1f41ffed56a525a5c025faa
Parents: 4dc4171
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Sep 8 13:32:37 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Sep 8 13:32:37 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/cache/PlatformCache.java      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b2b6ce6c/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 0829617..ecdfc2c 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -186,10 +186,10 @@ public class PlatformCache extends PlatformAbstractTarget {
     private static final GetAllWriter WRITER_GET_ALL = new GetAllWriter();
 
     /** */
-    private static final EntryProcessorExceptionWriter WRITER_PROC_ERR = new EntryProcessorExceptionWriter();
+    private static final EntryProcessorInvokeWriter WRITER_INVOKE = new EntryProcessorInvokeWriter();
 
     /** */
-    private static final EntryProcessorResultsWriter WRITER_INVOKE_ALL = new EntryProcessorResultsWriter();
+    private static final EntryProcessorInvokeAllWriter WRITER_INVOKE_ALL = new EntryProcessorInvokeAllWriter();
 
     /** Map with currently active locks. */
     private final ConcurrentMap<Long, Lock> lockMap = GridConcurrentFactory.newMap();
@@ -694,7 +694,7 @@ public class PlatformCache extends PlatformAbstractTarget {
             return WRITER_GET_ALL;
 
         if (opId == OP_INVOKE)
-            return WRITER_PROC_ERR;
+            return WRITER_INVOKE;
 
         if (opId == OP_INVOKE_ALL)
             return WRITER_INVOKE_ALL;
@@ -981,16 +981,16 @@ public class PlatformCache extends PlatformAbstractTarget {
     /**
      * Writes error with EntryProcessorException cause.
      */
-    private static class EntryProcessorExceptionWriter implements PlatformFutureUtils.Writer {
+    private static class EntryProcessorInvokeWriter implements PlatformFutureUtils.Writer {
         /** <inheritDoc /> */
         @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
             if (err == null) {
-                writer.writeBoolean(true);  // success
+                writer.writeBoolean(false);  // No error.
 
                 writer.writeObjectDetached(obj);
             }
             else {
-                writer.writeBoolean(false);  // failure
+                writer.writeBoolean(true);  // Error.
 
                 writeError(writer, (Exception) err);
             }
@@ -1005,7 +1005,7 @@ public class PlatformCache extends PlatformAbstractTarget {
     /**
      * Writes results of InvokeAll method.
      */
-    private static class EntryProcessorResultsWriter implements PlatformFutureUtils.Writer {
+    private static class EntryProcessorInvokeAllWriter implements PlatformFutureUtils.Writer {
         /** <inheritDoc /> */
         @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
             writeInvokeAllResult(writer, (Map)obj);