Skip to content

Commit

Permalink
rhos sentinel changes added
Browse files Browse the repository at this point in the history
  • Loading branch information
imrankhan08 committed Apr 26, 2024
1 parent 7ec9dda commit 6422076
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/fynd/extension/storage/RedisStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class RedisStorage extends BaseStorage {
private JedisPool jedisPool;
private JedisCluster jedisCluster;
private String prefixKey;
private JedisSentinelPool jedisSentinelPool;

public RedisStorage(JedisPool jedisPool, String prefixKey) {
super(prefixKey);
Expand All @@ -25,6 +26,13 @@ public RedisStorage(JedisCluster jedisCluster, String prefixKey) {
this.isClusterMode = true;
}

public RedisStorage(JedisSentinelPool jedisSentinelPool, String prefixKey) {
super(prefixKey);
this.jedisSentinelPool = jedisSentinelPool;
this.prefixKey = prefixKey;
this.isClusterMode = false; // Sentinel doesn't use clustering
}

@Override
public String get(String key) {
if (isClusterMode) {
Expand Down

0 comments on commit 6422076

Please sign in to comment.