ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: Minor changes.
Date Wed, 14 Sep 2016 09:15:10 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3199-1 e18e14ee8 -> 50329b71b


Minor changes.


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

Branch: refs/heads/ignite-3199-1
Commit: 50329b71b106c808f68dd294aa045ee0a5291e4c
Parents: e18e14e
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Sep 14 12:14:54 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Sep 14 12:14:54 2016 +0300

----------------------------------------------------------------------
 .../websession/PlatformDotnetSessionData.java   |  1 +
 .../PlatformDotnetSessionLockResult.java        | 24 +---------
 ...tformDotnetSessionSetAndUnlockProcessor.java | 48 +++++++++++---------
 3 files changed, 30 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50329b71/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionData.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionData.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionData.java
index bf0804d..a1a6506 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionData.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionData.java
@@ -161,6 +161,7 @@ public class PlatformDotnetSessionData implements Binarylizable {
      * @param lockNodeId Lock node ID.
      * @param lockId Lock ID.
      * @param items Items.
+     * @param isDiff Diff flag.
      * @param staticObjects Static objects.
      * @param timeout Timeout.
      * @return Result.

http://git-wip-us.apache.org/repos/asf/ignite/blob/50329b71/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionLockResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionLockResult.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionLockResult.java
index 7893871..35cba5c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionLockResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionLockResult.java
@@ -42,7 +42,7 @@ public class PlatformDotnetSessionLockResult implements Binarylizable {
     private Timestamp lockTime;
 
     /**
-     * Ctor.
+     * Constructor.
      *
      * @param success Success flag.
      * @param data Session data.
@@ -56,27 +56,6 @@ public class PlatformDotnetSessionLockResult implements Binarylizable {
         this.lockTime = lockTime;
     }
 
-    /**
-     * @return Success flag.
-     */
-    public boolean success() {
-        return success;
-    }
-
-    /**
-     * @return Session state data.
-     */
-    public PlatformDotnetSessionData data() {
-        return data;
-    }
-
-    /**
-     * @return Lock time.
-     */
-    public Timestamp lockTime() {
-        return lockTime;
-    }
-
     /** {@inheritDoc} */
     @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
         BinaryRawWriter raw = writer.rawWriter();
@@ -106,6 +85,7 @@ public class PlatformDotnetSessionLockResult implements Binarylizable {
 
         if (success) {
             data = new PlatformDotnetSessionData();
+
             data.readBinary(raw);
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/50329b71/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionSetAndUnlockProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionSetAndUnlockProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionSetAndUnlockProcessor.java
index e733585..71cecd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionSetAndUnlockProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/PlatformDotnetSessionSetAndUnlockProcessor.java
@@ -62,17 +62,17 @@ public class PlatformDotnetSessionSetAndUnlockProcessor implements
     private int timeout;
 
     /**
-     * Constructor.
+     * Constructor for unlock.
      *
      * @param lockNodeId Lock node ID.
      * @param lockId Lock ID.
      */
     public PlatformDotnetSessionSetAndUnlockProcessor(UUID lockNodeId, long lockId) {
-        this(lockNodeId, lockId, false, null, false, null, -1);
+        this(lockNodeId, lockId, false, null, false, null, 0);
     }
 
     /**
-     * Constructor.
+     * Constructor for unlock/update.
      *
      * @param data Data.
      */
@@ -129,20 +129,23 @@ public class PlatformDotnetSessionSetAndUnlockProcessor implements
         raw.writeUuid(lockNodeId);
         raw.writeLong(lockId);
         raw.writeBoolean(update);
-        raw.writeBoolean(isDiff);
-        raw.writeByteArray(staticData);
-        raw.writeInt(timeout);
 
-        if (items != null) {
-            raw.writeInt(items.size());
+        if (update) {
+            raw.writeBoolean(isDiff);
+            raw.writeByteArray(staticData);
+            raw.writeInt(timeout);
+
+            if (items != null) {
+                raw.writeInt(items.size());
 
-            for (Map.Entry<String, byte[]> e : items.entrySet()) {
-                raw.writeString(e.getKey());
-                raw.writeByteArray(e.getValue());
+                for (Map.Entry<String, byte[]> e : items.entrySet()) {
+                    raw.writeString(e.getKey());
+                    raw.writeByteArray(e.getValue());
+                }
             }
+            else
+                raw.writeInt(-1);
         }
-        else
-            raw.writeInt(-1);
     }
 
     /** {@inheritDoc} */
@@ -152,17 +155,20 @@ public class PlatformDotnetSessionSetAndUnlockProcessor implements
         lockNodeId = raw.readUuid();
         lockId = raw.readLong();
         update = raw.readBoolean();
-        isDiff = raw.readBoolean();
-        staticData = raw.readByteArray();
-        timeout = raw.readInt();
 
-        int cnt = raw.readInt();
+        if (update) {
+            isDiff = raw.readBoolean();
+            staticData = raw.readByteArray();
+            timeout = raw.readInt();
 
-        if (cnt >= 0) {
-            items = new TreeMap<>();
+            int cnt = raw.readInt();
 
-            for (int i = 0; i < cnt; i++)
-                items.put(raw.readString(), raw.readByteArray());
+            if (cnt >= 0) {
+                items = new TreeMap<>();
+
+                for (int i = 0; i < cnt; i++)
+                    items.put(raw.readString(), raw.readByteArray());
+            }
         }
     }
 


Mime
View raw message