ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [15/50] ignite git commit: IGNITE-1388: Minor refactoring for platform invoke/invokeAll.
Date Wed, 09 Sep 2015 12:37:27 GMT
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-843
Commit: b2b6ce6c22734a47d1f41ffed56a525a5c025faa
Parents: 4dc4171
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Sep 8 13:32:37 2015 +0300
Committer: vozerov-gridgain <vozerov@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);


Mime
View raw message