Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to monitor Spring-data-redis pool metrics?

I want to monitor the pool metrics in Spring-data-redis. JedisConnectionFactory's pool is private. How can I get it? I search google but I cannot find good way to do this.

like image 775
XiaJun Avatar asked Oct 12 '18 02:10

XiaJun


People also ask

What is RedisConnectionFactory?

Provides a suitable connection for interacting with Redis. Returns: connection for interacting with Redis. Throws: IllegalStateException - if the connection factory requires initialization and the factory was not yet initialized.

What is the use of @RedisHash?

@RedisHash can take as parameters a timeToLive of type Long, and a String value, which will override the default Redis key prefix (by default, the key prefix is the fully qualified name of the class plus a colon). Within the class, most of the usual Spring Data annotations are supported.


1 Answers

Though Redis client use connection pool, most of time client use one connection to get/set of the data. Also, redis is single threaded application. You may not need connection pool information.

like image 91
Saikat Biswas Avatar answered Oct 01 '22 19:10

Saikat Biswas