Class GridRedisMessage

    • Constructor Detail

      • GridRedisMessage

        public GridRedisMessage​(int fullLen)
        Constructor.
        Parameters:
        fullLen - Length of the Redis message (command with parameters).
    • Method Detail

      • fullLength

        public int fullLength()
        Returns:
        Full message length;
      • append

        public void append​(String part)
        Appends the specified part to the message.
        Parameters:
        part - Part to append.
      • setResponse

        public void setResponse​(ByteBuffer response)
        Sets the response.
        Parameters:
        response - Response.
      • getResponse

        public ByteBuffer getResponse()
        Gets the response.
        Returns:
        Response.
      • messageSize

        public int messageSize()
        Returns:
        Number of elements in the message.
      • key

        public String key()
        Returns:
        Key for the command.
      • aux

        public String aux​(int idx)
        Returns:
        Parameters by index if available.
      • aux

        public List<String> aux()
        Returns:
        All parameters if available.
      • auxMKeys

        public List<String> auxMKeys()
        Returns:
        All parameters for multi-key commands if available.
      • cacheName

        @Nullable
        public @Nullable String cacheName()
        Returns:
        Cache name.
      • cacheName

        public void cacheName​(String cacheName)
        Parameters:
        cacheName - Cache name.
      • requestId

        public long requestId()
        This method is used to match request and response messages.
        Specified by:
        requestId in interface GridClientMessage
        Returns:
        request ID.
      • requestId

        public void requestId​(long reqId)
        Sets request id for outgoing packets.
        Specified by:
        requestId in interface GridClientMessage
        Parameters:
        reqId - request ID.
      • clientId

        public UUID clientId()
        Gets client identifier from which this request comes.
        Specified by:
        clientId in interface GridClientMessage
        Returns:
        Client identifier.
      • clientId

        public void clientId​(UUID id)
        Sets client identifier from which this request comes.
        Specified by:
        clientId in interface GridClientMessage
        Parameters:
        id - Client identifier.
      • destinationId

        public UUID destinationId()
        Gets identifier of the node where this message should be processed.
        Specified by:
        destinationId in interface GridClientMessage
        Returns:
        Client identifier.
      • destinationId

        public void destinationId​(UUID id)
        Sets identifier of the node where this message should be eventually delivered.
        Specified by:
        destinationId in interface GridClientMessage
        Parameters:
        id - Client identifier.
      • sessionToken

        public byte[] sessionToken()
        Gets client session token.
        Specified by:
        sessionToken in interface GridClientMessage
        Returns:
        Session token.
      • sessionToken

        public void sessionToken​(byte[] sesTok)
        Sets client session token.
        Specified by:
        sessionToken in interface GridClientMessage
        Parameters:
        sesTok - Session token.