A, Java customer end: jedis
- Get Jedis
- Jedis basic use
- Jedis use connection pooling
1. What Jedis that?
Jedis is a client of official, for redis operation. Redis follow the protocol provided by the various languages have corresponding client.
2, Jedis maven dependency of:
3、Jedis直连:
4, Jedis constructor analysis:
- host: a machine where the IP node Redis
- Redis port node: port
- connectionTimeout: client connection timeout
- soTimeout: Client read timeout
5, simple to use:
6, Jedis connection pool to use:
- Jedis直连
- Jedis connection pool
Scheme comparison
- JedisPool use
1)Jedis直连:
connection pool:
Scheme comparison:
Jedis connection pool:
Initialization Jedis connection pool, generally speaking JedisPool single embodiment.