Skip to content

Commit 3b7ab56

Browse files
committed
Remove deprecated API.
1 parent f8d9a03 commit 3b7ab56

36 files changed

+43
-1357
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
@@ -198,14 +198,6 @@ public void bgReWriteAof() {
198198
delegate.bgReWriteAof();
199199
}
200200

201-
/**
202-
* @deprecated As of 1.3, use {@link #bgReWriteAof}.
203-
*/
204-
@Deprecated
205-
public void bgWriteAof() {
206-
bgReWriteAof();
207-
}
208-
209201
@Override
210202
public List<byte[]> bLPop(int timeout, byte[]... keys) {
211203
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
@@ -1589,13 +1589,6 @@ default void pfMerge(byte[] destinationKey, byte[]... sourceKeys) {
15891589

15901590
// SERVER COMMANDS
15911591

1592-
/** @deprecated in favor of {@link RedisConnection#serverCommands()}. */
1593-
@Override
1594-
@Deprecated
1595-
default void bgWriteAof() {
1596-
serverCommands().bgWriteAof();
1597-
}
1598-
15991592
/** @deprecated in favor of {@link RedisConnection#serverCommands()}. */
16001593
@Override
16011594
@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
@@ -43,17 +43,6 @@ enum MigrateOption {
4343
COPY, REPLACE
4444
}
4545

46-
/**
47-
* Start an {@literal Append Only File} rewrite process on server.
48-
*
49-
* @deprecated As of 1.3, use {@link #bgReWriteAof}.
50-
* @see <a href="https://redis.io/commands/bgrewriteaof">Redis Documentation: BGREWRITEAOF</a>
51-
*/
52-
@Deprecated
53-
default void bgWriteAof() {
54-
bgReWriteAof();
55-
}
56-
5746
/**
5847
* Start an {@literal Append Only File} rewrite process on server.
5948
*

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
@@ -75,7 +75,7 @@
7575
public class JedisClusterConnection implements DefaultedRedisClusterConnection {
7676

7777
private static final ExceptionTranslationStrategy EXCEPTION_TRANSLATION = new FallbackExceptionTranslationStrategy(
78-
JedisConverters.exceptionConverter());
78+
JedisExceptionConverter.INSTANCE);
7979

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

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)