Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2219

Which Design Pattern can be used to create multiple Redis Connection?

$
0
0

I have a requirement to use Standalone, Sentinel or Cluster Connection for Redis which should pick the respective connection based on property specified in properties file.

example:

connectionType=cluster.

Then it should create StatefulRedisClusterConnection object.

if connectionType=standalone

Then it should create StatefulRedisConnection object

What is the best design pattern to achieve the type of connection at runtime?


Viewing all articles
Browse latest Browse all 2219

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>