redicl
Type members
Classlikes
https://redis.io/docs/reference/protocol-spec/#resp-arrays
Specialized version of BulkString which is backed by an array.
Specialized version of BulkString which is backed by an array.
BulkStrings are always used to send messages to the server. Thus, this
class is not only used when materializing messages as explicit
RespValue
s, but also as the argument accepted by Redis.exec
. Hence, for
performance reasons, it is split into the following hierarchy:
BulkStrings are always used to send messages to the server. Thus, this
class is not only used when materializing messages as explicit
RespValue
s, but also as the argument accepted by Redis.exec
. Hence, for
performance reasons, it is split into the following hierarchy:
- This class, which describes the minimal behaviour needed to send data to Redis but does not specify where the data comes from.
- A specialized class
ArrayBulkString
which is backed by a byte array and used when receiving data from Redis.
This separation allows some methods to treat the array-backed instance specially and use the array directly instead of copying memory.
https://redis.io/docs/reference/protocol-spec/#resp-bulk-strings
- Companion:
- object
We want a "natural" API for users calling exec in a REPL, so we provide implicit conversions for a bunch of common types.
We want a "natural" API for users calling exec in a REPL, so we provide implicit conversions for a bunch of common types.
- Companion:
- class
https://redis.io/docs/reference/protocol-spec/#resp-errors
Represents null strings as well as null arrays.
Represents null strings as well as null arrays.
https://redis.io/docs/reference/protocol-spec/#resp-integers
A command error originating from Redis, indicating that an operation did not succeed.
A command error originating from Redis, indicating that an operation did not succeed.
The RESP protocol was not followed correctly. This means that some unexpected data was received or a stream closed in the middle of an operation.
The RESP protocol was not followed correctly. This means that some unexpected data was received or a stream closed in the middle of an operation.
If this exception occurs, there is not much that can be done. It typically indicates that either something went wrong over the network or that the client and server speak a different version of the protocol (or a bug in the implementation). Usually, the best course of action is to close the client.
Scala model of the RESP message types.
Scala model of the RESP message types.
Instances of these classes are only used when a user runs a raw redis
command and is interested in the output as Redis returns it (see
Redis.exec
). Most commonly however, messages will be instantiated directly
via the Visitor[A]
and Reader[A]
mechanisms.
The BulkString
instance is a little special, since it is always used to
send messages to the server. Note however, that the base class is simply a
forwarder and does not require that any intermediate byte array be
allocated.
- Companion:
- object
https://redis.io/docs/reference/protocol-spec/#resp-simple-strings
A visitor which defaults to throwing a protocol exception. Override the methods you are interested in.
A visitor which defaults to throwing a protocol exception. Override the methods you are interested in.
Used for internally parsing results from the Redis server with minimal overhead (i.e. to avoid materializing intermediate data structures).
Used for internally parsing results from the Redis server with minimal overhead (i.e. to avoid materializing intermediate data structures).
See Reader[A]
for reading BulkStrings to user-level data types.