-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Make a bridge between JedisPool and JedisPooled #4371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add unit test to verify connection is returned to the pool
Add helpers to Jedis pool (redis#4366)
more tests and renamed interface
more unir tests
renamed to JedisProvider make return connection better tests
make a bridge between JedisPool and JedisPooled
little fixes
|
It gives me this error
But I don't know how to fix it, I don't see how to propertly make it valid. |
|
Hi @oscar-besga-panel Regarding the formatting issue, please run: |
|
Hi @ggivo Tks |
This PR is intented to make a bridge between JedisPool and JedisPooled by making these two share a common interface JedisProvider.
JedisProvider provides methods to get and return a Jedis connection; and also helpers to use within a lambda.
Jedis is modified to return the connection when closed to the appropiate pool.
JedisPooled implements the method to get and return a Jedis object by providing the connection and the source pool, and to return this connection to the pool.
Also it has unit and funcional test to check everything.
I'm not sure if this is adecuate rigth now, if there's a neeed for it (in my project I'm already migrating from JedisPool to JedisPooled).
But if it serves, or you have detected the need for it, I think this could be the way to do it.
Thanks for your time