ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [21/22] incubator-ignite git commit: #ignite-51: IgniteTxEntry implements Message: working version.
Date Wed, 04 Mar 2015 13:26:56 GMT
#ignite-51: IgniteTxEntry implements Message: working version.


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

Branch: refs/heads/ignite-51
Commit: 8157fedfb3b3d56209e7f7125a331726a06d5b94
Parents: b4f2f8f
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Wed Mar 4 16:09:05 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Wed Mar 4 16:09:05 2015 +0300

----------------------------------------------------------------------
 .../internal/direct/DirectByteBufferStream.java | 22 +++++++++++++-------
 .../cache/transactions/IgniteTxEntry.java       |  9 +-------
 2 files changed, 15 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8157fedf/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
index 048617d..32a8d84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
@@ -246,6 +246,12 @@ public class DirectByteBufferStream {
     private Iterator<?> it;
 
     /** */
+    private Iterator<?> arrIt;
+
+    /** */
+    private Object arrCur = NULL;
+
+    /** */
     private Object mapCur = NULL;
 
     /** */
@@ -569,28 +575,28 @@ public class DirectByteBufferStream {
      */
     public <T> void writeObjectArray(T[] arr, MessageCollectionItemType itemType, MessageWriter
writer) {
         if (arr != null) {
-            if (it == null) {
+            if (arrIt == null) {
                 writeInt(arr.length);
 
                 if (!lastFinished)
                     return;
 
-                it = arrayIterator(arr);
+                arrIt = arrayIterator(arr);
             }
 
-            while (it.hasNext() || cur != NULL) {
-                if (cur == NULL)
-                    cur = it.next();
+            while (arrIt.hasNext() || arrCur != NULL) {
+                if (arrCur == NULL)
+                    arrCur = arrIt.next();
 
-                write(itemType, cur, writer);
+                write(itemType, arrCur, writer);
 
                 if (!lastFinished)
                     return;
 
-                cur = NULL;
+                arrCur = NULL;
             }
 
-            it = null;
+            arrIt = null;
         }
         else
             writeInt(-1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8157fedf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index 48b7fb4..87ab46b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -803,14 +803,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
                 writer.incrementState();
 
             case 5:
-                if (!F.isEmptyOrNulls(filters)) {
-                    for (CacheEntryPredicate filter : filters) {
-                        if (filter == null) {
-                            System.out.println("TEST FAIL");
-                        }
-                    }
-                }
-                if (!writer.writeObjectArray("filters", filters, MessageCollectionItemType.MSG))
+                if (!writer.writeObjectArray("filters", !F.isEmptyOrNulls(filters) ? filters
: null, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();


Mime
View raw message