DATAREDIS-667 - Deprecate LettucePool and DefaultLettucePool.
Original Pull Request: #262
This commit is contained in:
committed by
Christoph Strobl
parent
d731dfcf81
commit
17309dd070
@@ -40,7 +40,9 @@ import org.springframework.util.StringUtils;
|
||||
* @author Jennifer Hickey
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 2.0, use pooling via {@link LettucePoolingClientConfiguration}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class DefaultLettucePool implements LettucePool, InitializingBean {
|
||||
|
||||
@SuppressWarnings("rawtypes") //
|
||||
@@ -126,7 +128,8 @@ public class DefaultLettucePool implements LettucePool, InitializingBean {
|
||||
private RedisURI getRedisURI() {
|
||||
|
||||
RedisURI redisUri = isRedisSentinelAware()
|
||||
? LettuceConverters.sentinelConfigurationToRedisURI(sentinelConfiguration) : createSimpleHostRedisURI();
|
||||
? LettuceConverters.sentinelConfigurationToRedisURI(sentinelConfiguration)
|
||||
: createSimpleHostRedisURI();
|
||||
|
||||
if (StringUtils.hasText(password)) {
|
||||
redisUri.setPassword(password);
|
||||
|
||||
@@ -223,7 +223,9 @@ public class LettuceConnection extends AbstractRedisConnection {
|
||||
* @param timeout The connection timeout (in milliseconds) * @param client The {@link RedisClient} to use when
|
||||
* instantiating a pub/sub connection
|
||||
* @param pool The connection pool to use for all other native connections
|
||||
* @deprecated since 2.0, use pooling via {@link LettucePoolingClientConfiguration}.
|
||||
*/
|
||||
@Deprecated
|
||||
public LettuceConnection(long timeout, RedisClient client, LettucePool pool) {
|
||||
this(null, timeout, client, pool);
|
||||
}
|
||||
@@ -248,7 +250,10 @@ public class LettuceConnection extends AbstractRedisConnection {
|
||||
* @param timeout The connection timeout (in milliseconds)
|
||||
* @param client The {@link RedisClient} to use when making pub/sub connections
|
||||
* @param pool The connection pool to use for blocking and tx operations
|
||||
* @deprecated since 2.0, use
|
||||
* {@link #LettuceConnection(StatefulRedisConnection, LettuceConnectionProvider, long, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
public LettuceConnection(StatefulRedisConnection<byte[], byte[]> sharedConnection, long timeout, RedisClient client,
|
||||
LettucePool pool) {
|
||||
|
||||
@@ -263,7 +268,10 @@ public class LettuceConnection extends AbstractRedisConnection {
|
||||
* @param pool The connection pool to use for blocking and tx operations.
|
||||
* @param defaultDbIndex The db index to use along with {@link RedisClient} when establishing a dedicated connection.
|
||||
* @since 1.7
|
||||
* @deprecated since 2.0, use
|
||||
* {@link #LettuceConnection(StatefulRedisConnection, LettuceConnectionProvider, long, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
public LettuceConnection(StatefulRedisConnection<byte[], byte[]> sharedConnection, long timeout,
|
||||
AbstractRedisClient client, LettucePool pool, int defaultDbIndex) {
|
||||
|
||||
|
||||
@@ -151,6 +151,11 @@ public class LettuceConnectionFactory
|
||||
this(clusterConfiguration, new MutableLettuceClientConfiguration());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pool
|
||||
* @deprecated since 2.0, use pooling via {@link LettucePoolingClientConfiguration}.
|
||||
*/
|
||||
@Deprecated
|
||||
public LettuceConnectionFactory(LettucePool pool) {
|
||||
this(new MutableLettuceClientConfiguration());
|
||||
this.pool = pool;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.data.redis.connection.lettuce;
|
||||
|
||||
import io.lettuce.core.AbstractRedisClient;
|
||||
@@ -23,11 +22,13 @@ import org.springframework.data.redis.connection.Pool;
|
||||
|
||||
/**
|
||||
* Pool of Lettuce {@link StatefulConnection}s
|
||||
*
|
||||
*
|
||||
* @author Jennifer Hickey
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 2.0, use pooling via {@link LettucePoolingClientConfiguration}.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface LettucePool extends Pool<StatefulConnection<byte[], byte[]>> {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user