How it works...
In the first application, JedisSingleDemo, we connect to the Redis Server by creating a Jedis instance with the server hostname. The default port is 6379 if it's not specified. The Jedis class also has a couple of other constructors, in which we can specify the server port, connection timeout, and so on.
Once we get the Jedis instance, we can call its functions to send commands to the Redis Server. The function names are just the same as the Redis command names we introduced in previous chapters.
In the Using pipeline recipe of Chapter 3, Data Features, we learned how to use the Redis pipeline feature by manually constructing raw RESP strings. Using a Redis pipeline with the help of Jedis is much easier, as Jedis will take ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access