Class TransformingOutput<K,​V,​S,​T>


  • public class TransformingOutput<K,​V,​S,​T>
    extends CommandOutput<K,​V,​T>
    Command output that can transform the output from an underlying command output by applying a mapping function.
    Since:
    6.3
    Author:
    Mark Paluch
    • Method Detail

      • set

        public void set​(ByteBuffer bytes)
        Description copied from class: CommandOutput
        Update the command output with a sequence of bytes, or null. Concrete CommandOutput implementations must override this method to decode bulk/bytes response values.
        Overrides:
        set in class CommandOutput<K,​V,​T>
        Parameters:
        bytes - The command output, or null.
      • setSingle

        public void setSingle​(ByteBuffer bytes)
        Description copied from class: CommandOutput
        Update the command output with a sequence of bytes, or null representing a simple string. Concrete CommandOutput implementations must override this method to decode single/bytes response values.
        Overrides:
        setSingle in class CommandOutput<K,​V,​T>
        Parameters:
        bytes - The command output, or null.
      • setBigNumber

        public void setBigNumber​(ByteBuffer bytes)
        Description copied from class: CommandOutput
        Update the command output with a big number. Concrete CommandOutput implementations must override this method to decode big number response values.
        Overrides:
        setBigNumber in class CommandOutput<K,​V,​T>
        Parameters:
        bytes - The command output, or null.
      • set

        public void set​(long integer)
        Description copied from class: CommandOutput
        Update the command output with a 64-bit signed integer. Concrete CommandOutput implementations must override this method to decode number (integer) response values.
        Overrides:
        set in class CommandOutput<K,​V,​T>
        Parameters:
        integer - The command output.
      • set

        public void set​(double number)
        Description copied from class: CommandOutput
        Update the command output with a floating-point number. Concrete CommandOutput implementations must override this method to decode double response values.
        Overrides:
        set in class CommandOutput<K,​V,​T>
        Parameters:
        number - The command output.
      • set

        public void set​(boolean value)
        Description copied from class: CommandOutput
        Update the command output with a boolean. Concrete CommandOutput implementations must override this method to decode boolean response values.
        Overrides:
        set in class CommandOutput<K,​V,​T>
        Parameters:
        value - The command output.
      • setError

        public void setError​(ByteBuffer error)
        Description copied from class: CommandOutput
        Set command output to an error message from the server.
        Overrides:
        setError in class CommandOutput<K,​V,​T>
        Parameters:
        error - Error message.
      • setError

        public void setError​(String error)
        Description copied from class: CommandOutput
        Set command output to an error message from the client.
        Overrides:
        setError in class CommandOutput<K,​V,​T>
        Parameters:
        error - Error message.
      • hasError

        public boolean hasError()
        Description copied from class: CommandOutput
        Check if the command resulted in an error.
        Overrides:
        hasError in class CommandOutput<K,​V,​T>
        Returns:
        true if command resulted in an error.
      • get

        public T get()
        Description copied from class: CommandOutput
        Get the command output.
        Overrides:
        get in class CommandOutput<K,​V,​T>
        Returns:
        The command output.
      • complete

        public void complete​(int depth)
        Description copied from class: CommandOutput
        Mark the command output complete.
        Overrides:
        complete in class CommandOutput<K,​V,​T>
        Parameters:
        depth - Remaining depth of output queue.
      • multi

        public void multi​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a multi sequence (array).
        Overrides:
        multi in class CommandOutput<K,​V,​T>
        Parameters:
        count - expected number of elements in this multi sequence.
      • multiArray

        public void multiArray​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a multi sequence (array).
        Overrides:
        multiArray in class CommandOutput<K,​V,​T>
        Parameters:
        count - expected number of elements in this multi sequence.
      • multiPush

        public void multiPush​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a multi sequence (push-array).
        Overrides:
        multiPush in class CommandOutput<K,​V,​T>
        Parameters:
        count - expected number of elements in this multi sequence.
      • multiMap

        public void multiMap​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a multi sequence (map).
        Overrides:
        multiMap in class CommandOutput<K,​V,​T>
        Parameters:
        count - expected number of elements in this multi sequence.
      • multiSet

        public void multiSet​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a set.
        Overrides:
        multiSet in class CommandOutput<K,​V,​T>
        Parameters:
        count - expected number of elements in this multi sequence.