/** * Indicates the use of a connection pool. * * @return the use of connection pooling. */ public boolean getUsePool() { // Jedis Sentinel cannot operate without a pool. if (isRedisSentinelAware()) { return true; } return clientConfiguration.isUsePooling(); }
private Pool<Jedis> createPool() { if (isRedisSentinelAware()) { return createRedisSentinelPool((RedisSentinelConfiguration) this.configuration); } return createRedisPool(); }
/** * Turns on or off the use of connection pooling. * * @param usePool the usePool to set. * @deprecated since 2.0, configure pooling usage with {@link JedisClientConfiguration}. * @throws IllegalStateException if {@link JedisClientConfiguration} is immutable. * @throws IllegalStateException if configured to use sentinel and {@code usePool} is {@literal false} as Jedis * requires pooling for Redis sentinel use. */ @Deprecated public void setUsePool(boolean usePool) { if (isRedisSentinelAware() && !usePool) { throw new IllegalStateException("Jedis requires pooling for Redis Sentinel use!"); } getMutableConfiguration().setUsePooling(usePool); }
@Override public RedisSentinelConnection getSentinelConnection() { if (!isRedisSentinelAware()) { throw new InvalidDataAccessResourceUsageException("No Sentinels configured"); } return new JedisSentinelConnection(getActiveSentinel()); }
/** * Indicates the use of a connection pool. * * @return the use of connection pooling. */ public boolean getUsePool() { // Jedis Sentinel cannot operate without a pool. if (isRedisSentinelAware()) { return true; } return clientConfiguration.isUsePooling(); }
/** * Indicates the use of a connection pool. * * @return the use of connection pooling. */ public boolean getUsePool() { // Jedis Sentinel cannot operate without a pool. if (isRedisSentinelAware()) { return true; } return clientConfiguration.isUsePooling(); }
/** * Turns on or off the use of connection pooling. * * @param usePool the usePool to set. * @deprecated since 2.0, configure pooling usage with {@link JedisClientConfiguration}. * @throws IllegalStateException if {@link JedisClientConfiguration} is immutable. * @throws IllegalStateException if configured to use sentinel and {@code usePool} is {@literal false} as Jedis * requires pooling for Redis sentinel use. */ @Deprecated public void setUsePool(boolean usePool) { if (isRedisSentinelAware() && !usePool) { throw new IllegalStateException("Jedis requires pooling for Redis Sentinel use!"); } getMutableConfiguration().setUsePooling(usePool); }
/** * Turns on or off the use of connection pooling. * * @param usePool the usePool to set. * @deprecated since 2.0, configure pooling usage with {@link JedisClientConfiguration}. * @throws IllegalStateException if {@link JedisClientConfiguration} is immutable. * @throws IllegalStateException if configured to use sentinel and {@code usePool} is {@literal false} as Jedis * requires pooling for Redis sentinel use. */ @Deprecated public void setUsePool(boolean usePool) { if (isRedisSentinelAware() && !usePool) { throw new IllegalStateException("Jedis requires pooling for Redis Sentinel use!"); } getMutableConfiguration().setUsePooling(usePool); }
private Pool<Jedis> createPool() { if (isRedisSentinelAware()) { return createRedisSentinelPool((RedisSentinelConfiguration) this.configuration); } return createRedisPool(); }
private Pool<Jedis> createPool() { if (isRedisSentinelAware()) { return createRedisSentinelPool((RedisSentinelConfiguration) this.configuration); } return createRedisPool(); }
@Override public RedisSentinelConnection getSentinelConnection() { if (!isRedisSentinelAware()) { throw new InvalidDataAccessResourceUsageException("No Sentinels configured"); } return new JedisSentinelConnection(getActiveSentinel()); }
@Override public RedisSentinelConnection getSentinelConnection() { if (!isRedisSentinelAware()) { throw new InvalidDataAccessResourceUsageException("No Sentinels configured"); } return new JedisSentinelConnection(getActiveSentinel()); }
serverConfig.setPassword(new String(clusterConfig.getPassword().get())); } else if (jedisConnectionFactory.isRedisSentinelAware()) { logger.info("Sentinel redis."); RedisSentinelConfiguration sentinelConfig = jedisConnectionFactory.getSentinelConfiguration();