BulkString

trait BulkString extends RespValue

BulkStrings are always used to send messages to the server. Thus, this class is not only used when materializing messages as explicit RespValues, 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
trait RespValue
class Object
trait Matchable
class Any

Value members

Abstract methods

def length: Long
def writeBytesTo(out: OutputStream): Unit

Concrete methods

def pretty(nesting: Int, out: PrintStream): Unit

Inherited methods

def arr: IndexedSeq[RespValue]
Inherited from:
RespValue
def arrOpt: Option[IndexedSeq[RespValue]]
Inherited from:
RespValue
Inherited from:
RespValue
def bulkStrOpt: Option[BulkString]
Inherited from:
RespValue
def bytes: Array[Byte]
Inherited from:
RespValue
def isNull: Boolean
Inherited from:
RespValue
def num: Long
Inherited from:
RespValue
def numOpt: Option[Long]
Inherited from:
RespValue
def pretty: String
Inherited from:
RespValue
def str: String
Inherited from:
RespValue
def strOpt: Option[String]
Inherited from:
RespValue