Skip to content

Introduce LettuceInvoker #1948

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 4 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
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>2.5.0-DATAREDIS-1224-SNAPSHOT</version>

<name>Spring Data Redis</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ default Long lPos(byte[] key, byte[] element) {
* @see <a href="https://redis.io/commands/lpos">Redis Documentation: LPOS</a>
* @since 2.4
*/
@Nullable
List<Long> lPos(byte[] key, byte[] element, @Nullable Integer rank, @Nullable Integer count);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*/
public class LongToBooleanConverter implements Converter<Long, Boolean> {

public static final LongToBooleanConverter INSTANCE = new LongToBooleanConverter();

/*
* (non-Javadoc)
* @see org.springframework.core.convert.converter.Converter#convert(Object)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
*/
public class StringToRedisClientInfoConverter implements Converter<String[], List<RedisClientInfo>> {

public static final StringToRedisClientInfoConverter INSTANCE = new StringToRedisClientInfoConverter();

/*
* (non-Javadoc)
* @see org.springframework.core.convert.converter.Converter#convert(Object)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ class LettuceClusterHyperLogLogCommands extends LettuceHyperLogLogCommands {
public Long pfCount(byte[]... keys) {

if (ClusterSlotHashUtil.isSameSlotForAllKeys(keys)) {

try {
return super.pfCount(keys);
} catch (Exception ex) {
throw convertLettuceAccessException(ex);
}

return super.pfCount(keys);
}

throw new InvalidDataAccessApiUsageException("All keys must map to same slot for pfcount in cluster mode.");
}

Expand All @@ -59,14 +54,10 @@ public void pfMerge(byte[] destinationKey, byte[]... sourceKeys) {
byte[][] allKeys = ByteUtils.mergeArrays(destinationKey, sourceKeys);

if (ClusterSlotHashUtil.isSameSlotForAllKeys(allKeys)) {
try {
super.pfMerge(destinationKey, sourceKeys);
return;
} catch (Exception ex) {
throw convertLettuceAccessException(ex);
}

super.pfMerge(destinationKey, sourceKeys);
return;
}

throw new InvalidDataAccessApiUsageException("All keys must map to same slot for pfmerge in cluster mode.");
}
}
Loading