ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [13/50] [abbrv] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Tue, 10 Feb 2015 04:09:44 GMT
IGNITE-61 - Direct marshalling


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

Branch: refs/heads/sprint-1
Commit: 88f5b9d49db9e90d44bd9796aa91e14b53caf769
Parents: 70c8f23
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Sat Feb 7 23:54:39 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Sat Feb 7 23:54:39 2015 -0800

----------------------------------------------------------------------
 .../ignite/codegen/CommunicationMessageCodeGenerator.java    | 4 ++--
 .../internal/direct/GridTcpCommunicationMessageFactory.java  | 2 +-
 .../processors/cache/distributed/dht/GridDhtLockFuture.java  | 2 +-
 .../cache/distributed/dht/GridDhtLockResponse.java           | 4 ++--
 .../dht/preloader/GridDhtPartitionDemandMessage.java         | 4 ++--
 .../dht/preloader/GridDhtPartitionSupplyMessage.java         | 8 ++++----
 .../plugin/extensions/communication/MessageAdapter.java      | 8 +++++---
 7 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
index 4a81a92..429b154 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
@@ -536,7 +536,7 @@ public class CommunicationMessageCodeGenerator {
             returnFalseIfFailed(write, "writer.writeObjectArray", field, name,
                 type.getComponentType().getSimpleName() + ".class");
         }
-        else if (Collection.class.isAssignableFrom(type)) {
+        else if (Collection.class.isAssignableFrom(type) && !Set.class.isAssignableFrom(type))
{
             assert colItemType != null;
 
             returnFalseIfFailed(write, "writer.writeCollection", field, name, colItemType.getSimpleName()
+ ".class");
@@ -613,7 +613,7 @@ public class CommunicationMessageCodeGenerator {
             returnFalseIfReadFailed(name, "reader.readObjectArray", field,
                 type.getComponentType().getSimpleName() + ".class");
         }
-        else if (Collection.class.isAssignableFrom(type)) {
+        else if (Collection.class.isAssignableFrom(type) && !Set.class.isAssignableFrom(type))
{
             assert colItemType != null;
 
             returnFalseIfReadFailed(name, "reader.readCollection", field,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
index b1cbe7e..600bd31 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
@@ -51,7 +51,7 @@ import java.util.*;
  */
 public class GridTcpCommunicationMessageFactory {
     /** Common message producers. */
-    private static final GridTcpCommunicationMessageProducer[] COMMON = new GridTcpCommunicationMessageProducer[83];
+    private static final GridTcpCommunicationMessageProducer[] COMMON = new GridTcpCommunicationMessageProducer[89];
 
     /**
      * Custom messages registry. Used for test purposes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 5cc6e76..7521af7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -1136,7 +1136,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
                     evictReaders(cctx, res.nearEvicted(), node.id(), res.messageId(), nearMapping);
                 }
 
-                Set<Integer> invalidParts = res.invalidPartitions();
+                Collection<Integer> invalidParts = res.invalidPartitions();
 
                 // Removing mappings for invalid partitions.
                 if (!F.isEmpty(invalidParts)) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
index 2f28b89..48ef34d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockResponse.java
@@ -55,7 +55,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K,
V>
     /** Invalid partitions. */
     @GridToStringInclude
     @GridDirectCollection(int.class)
-    private Set<Integer> invalidParts = new GridLeanSet<>();
+    private Collection<Integer> invalidParts = new GridLeanSet<>();
 
     @GridDirectTransient
     /** Preload entries. */
@@ -138,7 +138,7 @@ public class GridDhtLockResponse<K, V> extends GridDistributedLockResponse<K,
V>
     /**
      * @return Invalid partitions.
      */
-    public Set<Integer> invalidPartitions() {
+    public Collection<Integer> invalidPartitions() {
         return invalidParts;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
index 409522c..29760f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemandMessage.java
@@ -41,7 +41,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K,
V>
     /** Partition. */
     @GridToStringInclude
     @GridDirectCollection(int.class)
-    private Set<Integer> parts;
+    private Collection<Integer> parts;
 
     /** Topic. */
     @GridDirectTransient
@@ -112,7 +112,7 @@ public class GridDhtPartitionDemandMessage<K, V> extends GridCacheMessage<K,
V>
     /**
      * @return Partition.
      */
-    Set<Integer> partitions() {
+    Collection<Integer> partitions() {
         return parts;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
index 4835e77..ee1a930 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@ -46,12 +46,12 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K,
V>
 
     /** Partitions that have been fully sent. */
     @GridDirectCollection(int.class)
-    private Set<Integer> last;
+    private Collection<Integer> last;
 
     /** Partitions which were not found. */
     @GridToStringInclude
     @GridDirectCollection(int.class)
-    private Set<Integer> missed;
+    private Collection<Integer> missed;
 
     /** Entries. */
     @GridDirectTransient
@@ -130,7 +130,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K,
V>
     /**
      * @return Flag to indicate last message for partition.
      */
-    Set<Integer> last() {
+    Collection<Integer> last() {
         return last == null ? Collections.<Integer>emptySet() : last;
     }
 
@@ -166,7 +166,7 @@ public class GridDhtPartitionSupplyMessage<K, V> extends GridCacheMessage<K,
V>
     /**
      * @return Missed partitions.
      */
-    Set<Integer> missed() {
+    Collection<Integer> missed() {
         return missed == null ? Collections.<Integer>emptySet() : missed;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88f5b9d4/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
index d393e16..c2b4d96 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageAdapter.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.plugin.extensions.communication;
 
+import org.apache.ignite.internal.direct.*;
+
 import java.io.*;
 import java.nio.*;
 
@@ -25,7 +27,7 @@ import java.nio.*;
  */
 public abstract class MessageAdapter implements Serializable, Cloneable {
     /** Writer. */
-    protected MessageWriter writer;
+    protected final MessageWriter writer = new DirectMessageWriter();
 
     /** Reader. */
     protected MessageReader reader;
@@ -40,8 +42,8 @@ public abstract class MessageAdapter implements Serializable, Cloneable
{
      * @param writer Writer.
      */
     public final void setWriter(MessageWriter writer) {
-        if (this.writer == null)
-            this.writer = writer;
+//        if (this.writer == null)
+//            this.writer = writer;
     }
 
     /**


Mime
View raw message