对Jedis源码分析的一些记录
redis的RESP协议
- For Simple Strings the first byte of the reply is “+”
- For Errors the first byte of the reply is “-“
- For Integers the first byte of the reply is “:”
- For Bulk Strings the first byte of the reply is “$”
-
For Arrays the first byte of the reply is “*”
- 这些字符可以直接赋值给byte,字符编码绝对不会超过128
#jedis底层会处理”-“开头的错误码,而且抛出错,但是不是JedisConnectionException
#关于什么时候jedis会抛出JedisConnectionException