Skip to content

Conversation

@oscar-besga-panel
Copy link
Contributor

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

@oscar-besga-panel
Copy link
Contributor Author

It gives me this error

(default) on project jedis: File '/home/runner/work/jedis/jedis/src/test/java/redis/clients/jedis/JedisPooledUnitTest.java' has not been previously formatted. Please format file and commit before running validation!

But I don't know how to fix it, I don't see how to propertly make it valid.

@ggivo ggivo added the waiting-for-triage Still needs to be triaged label Dec 1, 2025
@ggivo
Copy link
Collaborator

ggivo commented Dec 1, 2025

Hi @oscar-besga-panel
Thanks for taking the time and sharing the idea.
The team is currently a bit overloaded finishing other tasks, but we will review this as soon as possible.

Regarding the formatting issue, please run:
mvn formatter:format

@oscar-besga-panel
Copy link
Contributor Author

Hi @ggivo
No problem, this is not urgent at all, no rush here.
Now tests look better.

Tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-triage Still needs to be triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants