ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [30/35] ignite git commit: IGNITE-2948 Optimize usage of GridCacheConcurrentMap: fixed compatibility (broken in commit 3be3d16)
Date Thu, 28 Apr 2016 13:02:14 GMT
IGNITE-2948 Optimize usage of GridCacheConcurrentMap: fixed compatibility (broken in commit
3be3d16)


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

Branch: refs/heads/ignite-db-x-10884
Commit: ab1f1949e6c9e1ed661b40e06e8cacd1a03ae09e
Parents: dcde8d1
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Apr 28 10:58:59 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Apr 28 10:58:59 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/direct/DirectMessageReader.java  | 5 +++++
 .../cache/distributed/near/GridNearSingleGetRequest.java    | 4 +++-
 .../processors/cache/transactions/IgniteTxEntry.java        | 4 ++--
 .../plugin/extensions/communication/MessageReader.java      | 9 +++++++++
 4 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ab1f1949/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
index 10bc7e2..7d3644f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
@@ -113,6 +113,11 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
+    @Override public int readInt(String name, int dflt) {
+        return readInt(name);
+    }
+
+    /** {@inheritDoc} */
     @Override public long readLong(String name) {
         DirectByteBufferStream stream = state.item().stream;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ab1f1949/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
index 62d37af..7fc2b1e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearSingleGetRequest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import java.nio.ByteBuffer;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.IgniteCodeGeneratingFail;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
@@ -37,6 +38,7 @@ import static org.apache.ignite.internal.processors.cache.GridCacheUtils.SKIP_ST
 /**
  *
  */
+@IgniteCodeGeneratingFail // partId read should not be generated by MessageCodeGenerator.
 public class GridNearSingleGetRequest extends GridCacheMessage implements GridCacheDeployable
{
     /** */
     private static final long serialVersionUID = 0L;
@@ -312,7 +314,7 @@ public class GridNearSingleGetRequest extends GridCacheMessage implements
GridCa
                 reader.incrementState();
 
             case 10:
-                partId = reader.readInt("partId");
+                partId = reader.readInt("partId", -1);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ab1f1949/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 4d8139f..45a3fff 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
@@ -65,7 +65,7 @@ import static org.apache.ignite.internal.processors.cache.GridCacheUtils.SKIP_ST
  * {@link #equals(Object)} method, as transaction entries should use referential
  * equality.
  */
-@IgniteCodeGeneratingFail // Field filters should not be generated by MessageCodeGenerator.
+@IgniteCodeGeneratingFail // Field filters, partId should not be generated by MessageCodeGenerator.
 public class IgniteTxEntry implements GridPeerDeployAware, Message {
     /** */
     private static final long serialVersionUID = 0L;
@@ -1162,7 +1162,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
                 reader.incrementState();
 
             case 12:
-                partId = reader.readInt("partId");
+                partId = reader.readInt("partId", -1);
 
                 if (!reader.isLastRead())
                     return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ab1f1949/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
index 502c69f..0502042 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
@@ -85,6 +85,15 @@ public interface MessageReader {
     public int readInt(String name);
 
     /**
+     * Reads {@code int} value.
+     *
+     * @param name Field name.
+     * @param dflt Default value if field not found.
+     * @return {@code int} value.
+     */
+    public int readInt(String name, int dflt);
+
+    /**
      * Reads {@code long} value.
      *
      * @param name Field name.


Mime
View raw message