Skip to content

Remove long deprecated API and refine API #2276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.0-GH-2195-SNAPSHOT</version>

<name>Spring Data Redis</name>

Expand Down
1 change: 1 addition & 0 deletions src/main/asciidoc/appendix/appendix-command-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
|RANDOMKEY |X
|RENAME |X
|RENAMENX |X
|REPLICAOF |X
|RESTORE |X
|ROLE |-
|RPOP |X
Expand Down
103 changes: 0 additions & 103 deletions src/main/java/org/springframework/data/redis/Version.java

This file was deleted.

58 changes: 0 additions & 58 deletions src/main/java/org/springframework/data/redis/VersionParser.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.Optional;
import java.util.function.Consumer;

import org.springframework.cache.Cache;
Expand Down Expand Up @@ -143,25 +142,6 @@ public RedisCacheConfiguration entryTtl(Duration ttl) {
valueSerializationPair, conversionService);
}

/**
* Use the given prefix instead of using the cache name. <br />
* This option replaces the cache name with {@code prefix} therefore we recommend rather using
* {@link #prefixCacheNameWith(String)} or {@link #computePrefixWith(CacheKeyPrefix)} for more control. <br />
* The generated cache key will be: {@code prefix + cache entry key}.
*
* @param prefix must not be {@literal null}.
* @return new {@link RedisCacheConfiguration}.
* @deprecated since 2.3. Use {@link #prefixCacheNameWith(String)} or {@link #computePrefixWith(CacheKeyPrefix)}
* instead.
*/
@Deprecated
public RedisCacheConfiguration prefixKeysWith(String prefix) {

Assert.notNull(prefix, "Prefix must not be null!");

return computePrefixWith((cacheName) -> prefix);
}

/**
* Prefix the {@link RedisCache#getName() cache name} with the given value. <br />
* The generated cache key will be: {@code prefix + cache name + "::" + cache entry key}.
Expand Down Expand Up @@ -261,15 +241,6 @@ public RedisCacheConfiguration serializeValuesWith(SerializationPair<?> valueSer
valueSerializationPair, conversionService);
}

/**
* @return never {@literal null}.
* @deprecated since 2.0.4. Please use {@link #getKeyPrefixFor(String)}.
*/
@Deprecated
public Optional<String> getKeyPrefix() {
return usePrefix() ? Optional.of(keyPrefix.compute("")) : Optional.empty();
}

/**
* Get the computed {@literal key} prefix for a given {@literal cacheName}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @author Mark Paluch
* @since 1.4
*/
public abstract class AbstractRedisConnection implements DefaultedRedisConnection {
public abstract class AbstractRedisConnection implements RedisConnection {

private @Nullable RedisSentinelConfiguration sentinelConfiguration;
private final Map<RedisNode, RedisSentinelConnection> connectionCache = new ConcurrentHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.connection;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

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

private static final long serialVersionUID = 5727044227040368955L;

private final Collection<? extends Throwable> causes;

/**
* Creates new {@link ClusterCommandExecutionFailureException}.
*
Expand All @@ -51,18 +48,8 @@ public ClusterCommandExecutionFailureException(Throwable cause) {
public ClusterCommandExecutionFailureException(List<? extends Throwable> causes) {

super(causes.get(0).getMessage(), causes.get(0));
this.causes = causes;

causes.forEach(this::addSuppressed);
}

/**
* Get the collected errors.
*
* @return never {@literal null}.
* @deprecated since 2.0, use {@link #getSuppressed()}.
*/
public Collection<? extends Throwable> getCauses() {
return causes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public Set<RedisClusterNode> getNodes() {
}

/**
* Get all nodes (master and slave) in cluster where {@code link-state} is {@literal connected} and {@code flags} does
* not contain {@literal fail} or {@literal fail?}.
* Get all nodes (master and replica) in cluster where {@code link-state} is {@literal connected} and {@code flags}
* does not contain {@literal fail} or {@literal fail?}.
*
* @return never {@literal null}.
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ public Set<RedisClusterNode> getMasterNodes() {
}

/**
* Get the {@link RedisClusterNode}s (master and slave) serving s specific slot.
* Get the {@link RedisClusterNode}s (master and replica) serving s specific slot.
*
* @param slot
* @return never {@literal null}.
Expand Down
Loading