Skip to content

Commit 5c4c9e0

Browse files
mp911dechristophstrobl
authored andcommitted
Remove deprecated API.
See: #2273 Original Pull Request: #2276
1 parent b45d358 commit 5c4c9e0

36 files changed

+39
-1355
lines changed

src/main/java/org/springframework/data/redis/cache/RedisCacheConfiguration.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import java.nio.charset.StandardCharsets;
1919
import java.time.Duration;
20-
import java.util.Optional;
2120
import java.util.function.Consumer;
2221

2322
import org.springframework.cache.Cache;
@@ -143,25 +142,6 @@ public RedisCacheConfiguration entryTtl(Duration ttl) {
143142
valueSerializationPair, conversionService);
144143
}
145144

146-
/**
147-
* Use the given prefix instead of using the cache name. <br />
148-
* This option replaces the cache name with {@code prefix} therefore we recommend rather using
149-
* {@link #prefixCacheNameWith(String)} or {@link #computePrefixWith(CacheKeyPrefix)} for more control. <br />
150-
* The generated cache key will be: {@code prefix + cache entry key}.
151-
*
152-
* @param prefix must not be {@literal null}.
153-
* @return new {@link RedisCacheConfiguration}.
154-
* @deprecated since 2.3. Use {@link #prefixCacheNameWith(String)} or {@link #computePrefixWith(CacheKeyPrefix)}
155-
* instead.
156-
*/
157-
@Deprecated
158-
public RedisCacheConfiguration prefixKeysWith(String prefix) {
159-
160-
Assert.notNull(prefix, "Prefix must not be null!");
161-
162-
return computePrefixWith((cacheName) -> prefix);
163-
}
164-
165145
/**
166146
* Prefix the {@link RedisCache#getName() cache name} with the given value. <br />
167147
* The generated cache key will be: {@code prefix + cache name + "::" + cache entry key}.
@@ -261,15 +241,6 @@ public RedisCacheConfiguration serializeValuesWith(SerializationPair<?> valueSer
261241
valueSerializationPair, conversionService);
262242
}
263243

264-
/**
265-
* @return never {@literal null}.
266-
* @deprecated since 2.0.4. Please use {@link #getKeyPrefixFor(String)}.
267-
*/
268-
@Deprecated
269-
public Optional<String> getKeyPrefix() {
270-
return usePrefix() ? Optional.of(keyPrefix.compute("")) : Optional.empty();
271-
}
272-
273244
/**
274245
* Get the computed {@literal key} prefix for a given {@literal cacheName}.
275246
*

src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutionFailureException.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package org.springframework.data.redis.connection;
1717

18-
import java.util.Collection;
1918
import java.util.Collections;
2019
import java.util.List;
2120

@@ -32,8 +31,6 @@ public class ClusterCommandExecutionFailureException extends UncategorizedDataAc
3231

3332
private static final long serialVersionUID = 5727044227040368955L;
3433

35-
private final Collection<? extends Throwable> causes;
36-
3734
/**
3835
* Creates new {@link ClusterCommandExecutionFailureException}.
3936
*
@@ -51,18 +48,8 @@ public ClusterCommandExecutionFailureException(Throwable cause) {
5148
public ClusterCommandExecutionFailureException(List<? extends Throwable> causes) {
5249

5350
super(causes.get(0).getMessage(), causes.get(0));
54-
this.causes = causes;
5551

5652
causes.forEach(this::addSuppressed);
5753
}
5854

59-
/**
60-
* Get the collected errors.
61-
*
62-
* @return never {@literal null}.
63-
* @deprecated since 2.0, use {@link #getSuppressed()}.
64-
*/
65-
public Collection<? extends Throwable> getCauses() {
66-
return causes;
67-
}
6855
}

src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,6 @@ public void bgReWriteAof() {
199199
delegate.bgReWriteAof();
200200
}
201201

202-
/**
203-
* @deprecated As of 1.3, use {@link #bgReWriteAof}.
204-
*/
205-
@Deprecated
206-
public void bgWriteAof() {
207-
bgReWriteAof();
208-
}
209-
210202
@Override
211203
public List<byte[]> bLPop(int timeout, byte[]... keys) {
212204
return convertAndReturn(delegate.bLPop(timeout, keys), Converters.identityConverter());

src/main/java/org/springframework/data/redis/connection/DefaultedRedisConnection.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,13 +1590,6 @@ default void pfMerge(byte[] destinationKey, byte[]... sourceKeys) {
15901590

15911591
// SERVER COMMANDS
15921592

1593-
/** @deprecated in favor of {@link RedisConnection#serverCommands()}. */
1594-
@Override
1595-
@Deprecated
1596-
default void bgWriteAof() {
1597-
serverCommands().bgWriteAof();
1598-
}
1599-
16001593
/** @deprecated in favor of {@link RedisConnection#serverCommands()}. */
16011594
@Override
16021595
@Deprecated

src/main/java/org/springframework/data/redis/connection/Pool.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/main/java/org/springframework/data/redis/connection/PoolConfig.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/main/java/org/springframework/data/redis/connection/ReactiveKeyCommands.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -346,16 +346,6 @@ public RenameCommand to(ByteBuffer newKey) {
346346
return new RenameCommand(getKey(), newKey);
347347
}
348348

349-
/**
350-
* @return can be {@literal null}.
351-
* @deprecated since 2.5.7, renamed to {@link #getNewKey()}.
352-
*/
353-
@Nullable
354-
@Deprecated
355-
public ByteBuffer getNewName() {
356-
return newKey;
357-
}
358-
359349
/**
360350
* @return can be {@literal null}.
361351
* @since 2.5.7

src/main/java/org/springframework/data/redis/connection/RedisServerCommands.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ enum FlushOption {
5151
SYNC, ASYNC
5252
}
5353

54-
/**
55-
* Start an {@literal Append Only File} rewrite process on server.
56-
*
57-
* @deprecated As of 1.3, use {@link #bgReWriteAof}.
58-
* @see <a href="https://redis.io/commands/bgrewriteaof">Redis Documentation: BGREWRITEAOF</a>
59-
*/
60-
@Deprecated
61-
default void bgWriteAof() {
62-
bgReWriteAof();
63-
}
64-
6554
/**
6655
* Start an {@literal Append Only File} rewrite process on server.
6756
*

src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
public class JedisClusterConnection implements DefaultedRedisClusterConnection {
7777

7878
private static final ExceptionTranslationStrategy EXCEPTION_TRANSLATION = new FallbackExceptionTranslationStrategy(
79-
JedisConverters.exceptionConverter());
79+
JedisExceptionConverter.INSTANCE);
8080

8181
private static final byte[][] EMPTY_2D_BYTE_ARRAY = new byte[0][];
8282

src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
public class JedisConnection extends AbstractRedisConnection {
6262

6363
private static final ExceptionTranslationStrategy EXCEPTION_TRANSLATION = new FallbackExceptionTranslationStrategy(
64-
JedisConverters.exceptionConverter());
64+
JedisExceptionConverter.INSTANCE);
6565

6666
private final Jedis jedis;
6767

@@ -417,7 +417,7 @@ public List<Object> exec() {
417417
try {
418418
if (isPipelined()) {
419419
pipeline(newJedisResult(getRequiredPipeline().exec(),
420-
new TransactionResultConverter<>(new LinkedList<>(txResults), JedisConverters.exceptionConverter())));
420+
new TransactionResultConverter<>(new LinkedList<>(txResults), JedisExceptionConverter.INSTANCE)));
421421
return null;
422422
}
423423

@@ -428,7 +428,7 @@ public List<Object> exec() {
428428
List<Object> results = transaction.exec();
429429

430430
return !CollectionUtils.isEmpty(results)
431-
? new TransactionResultConverter<>(txResults, JedisConverters.exceptionConverter()).convert(results)
431+
? new TransactionResultConverter<>(txResults, JedisExceptionConverter.INSTANCE).convert(results)
432432
: results;
433433
} catch (Exception ex) {
434434
throw convertJedisAccessException(ex);

0 commit comments

Comments
 (0)