ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shro...@apache.org
Subject ignite git commit: IGNITE-3066: Added missing comments.
Date Mon, 07 Nov 2016 08:30:39 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2788 091c52b19 -> f8a6dc1df


IGNITE-3066: Added missing comments.


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

Branch: refs/heads/ignite-2788
Commit: f8a6dc1dfcd55b8c8ce21538ef28a0a4db86aea9
Parents: 091c52b
Author: shtykh_roman <rshtykh@yahoo.com>
Authored: Mon Nov 7 17:30:07 2016 +0900
Committer: shtykh_roman <rshtykh@yahoo.com>
Committed: Mon Nov 7 17:30:07 2016 +0900

----------------------------------------------------------------------
 .../redis/GridRedisThruRestCommandHandler.java  |  2 +-
 .../string/GridRedisSetCommandHandler.java      |  4 +--
 .../protocols/tcp/redis/GridRedisMessage.java   |  9 -------
 .../tcp/redis/GridRedisProtocolParser.java      | 28 +++++++++++++-------
 4 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f8a6dc1d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/GridRedisThruRestCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/GridRedisThruRestCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/GridRedisThruRestCommandHandler.java
index 73a4131..668d00f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/GridRedisThruRestCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/GridRedisThruRestCommandHandler.java
@@ -93,7 +93,7 @@ public abstract class GridRedisThruRestCommandHandler implements GridRedisComman
      *
      * @param resp REST response.
      * @param params Auxiliary parameters.
-     * @return
+     * @return Response for the command.
      */
     public abstract ByteBuffer makeResponse(GridRestResponse resp, List<String> params);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f8a6dc1d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
index 09b97ab..2906f1b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/redis/string/GridRedisSetCommandHandler.java
@@ -24,10 +24,10 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.processors.rest.GridRestProtocolHandler;
 import org.apache.ignite.internal.processors.rest.GridRestResponse;
+import org.apache.ignite.internal.processors.rest.handlers.redis.GridRedisThruRestCommandHandler;
 import org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisCommand;
 import org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisMessage;
 import org.apache.ignite.internal.processors.rest.protocols.tcp.redis.GridRedisProtocolParser;
-import org.apache.ignite.internal.processors.rest.handlers.redis.GridRedisThruRestCommandHandler;
 import org.apache.ignite.internal.processors.rest.request.GridRestCacheRequest;
 import org.apache.ignite.internal.processors.rest.request.GridRestRequest;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -76,7 +76,7 @@ public class GridRedisSetCommandHandler extends GridRedisThruRestCommandHandler
         restReq.value(msg.aux(VAL_POS));
 
         if (msg.messageSize() >= 4) {
-            // handle options.
+            // TODO: handle options.
         }
 
         return restReq;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f8a6dc1d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisMessage.java
index b5e15d6..5974ed0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisMessage.java
@@ -65,15 +65,6 @@ public class GridRedisMessage implements GridClientMessage {
         msgParts = new ArrayList<>(msgLen);
     }
 
-    public GridRedisMessage copy(GridRedisMessage msg) {
-        GridRedisMessage m = new GridRedisMessage(msgParts.size());
-
-        for (String p : msgParts)
-            m.append(p);
-
-        return m;
-    }
-
     public void append(String part) {
         msgParts.add(part);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f8a6dc1d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
index ac422fe..ea51671 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
@@ -23,7 +23,7 @@ import java.util.Map;
 import org.apache.ignite.IgniteCheckedException;
 
 /**
- * Parser to decode/encode Redis protocol (REDIS) requests.
+ * Parser to decode/encode Redis protocol (RESP) requests.
  */
 public class GridRedisProtocolParser {
     /** + prefix. */
@@ -66,10 +66,10 @@ public class GridRedisProtocolParser {
     private static final byte[] OK = "OK".getBytes();
 
     /**
-     * Reads array.
+     * Reads an array into {@link GridRedisMessage}.
      *
-     * @param buf
-     * @return
+     * @param buf Buffer.
+     * @return {@link GridRedisMessage}.
      * @throws IgniteCheckedException
      */
     public static GridRedisMessage readArray(ByteBuffer buf) throws IgniteCheckedException
{
@@ -91,7 +91,7 @@ public class GridRedisProtocolParser {
     /**
      * Reads a bulk string.
      *
-     * @param buf
+     * @param buf Buffer.
      * @return Bulk string.
      * @throws IgniteCheckedException
      */
@@ -113,9 +113,9 @@ public class GridRedisProtocolParser {
     }
 
     /**
-     * Counts elements.
+     * Counts elements in buffer.
      *
-     * @param buf
+     * @param buf Buffer.
      * @return Count of elements.
      */
     private static int elCnt(ByteBuffer buf) throws IgniteCheckedException {
@@ -212,7 +212,7 @@ public class GridRedisProtocolParser {
     }
 
     /**
-     * Converts an integer result to a REDIS integer.
+     * Converts an integer result to a RESP integer.
      *
      * @param integer Integer result.
      * @return REDIS integer.
@@ -231,7 +231,7 @@ public class GridRedisProtocolParser {
     }
 
     /**
-     * Converts an integer result to a REDIS integer.
+     * Converts an integer result to a RESP integer.
      *
      * @param integer Integer result.
      * @return REDIS integer.
@@ -241,6 +241,8 @@ public class GridRedisProtocolParser {
     }
 
     /**
+     * Creates Nil response.
+     *
      * @return Nil response.
      */
     public static ByteBuffer nil() {
@@ -276,11 +278,19 @@ public class GridRedisProtocolParser {
         return buf;
     }
 
+    /**
+     * Converts a resultant map response to an array.
+     *
+     * @param vals Map.
+     * @return Array response.
+     */
     public static ByteBuffer toArray(Map<Object, Object> vals) {
         return toArray(vals.values());
     }
 
     /**
+     * Converts a resultant collection response to an array.
+     *
      * @param vals Array elements.
      * @return Array response.
      */


Mime
View raw message