Skip to content

Commit

Permalink
add getAsyncCommands method for API
Browse files Browse the repository at this point in the history
  • Loading branch information
jszouxue committed Feb 28, 2023
1 parent c779abf commit 69688a2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ under the License.

<groupId>io.github.jeff-zou</groupId>
<artifactId>flink-connector-redis</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
<packaging>jar</packaging>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.lettuce.core.cluster.RedisClusterClient;
import io.lettuce.core.cluster.api.StatefulRedisClusterConnection;
import io.lettuce.core.cluster.api.async.RedisAdvancedClusterAsyncCommands;
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -405,4 +406,9 @@ public RedisFuture<Map<String, String>> hgetAll(String key) {
}
return result;
}

@Override
public RedisClusterAsyncCommands getAsyncCommands() {
return clusterAsyncCommands;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.apache.flink.streaming.connectors.redis.common.container;

import io.lettuce.core.RedisFuture;
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands;

import java.io.IOException;
import java.io.Serializable;
Expand Down Expand Up @@ -212,4 +213,11 @@ public interface RedisCommandsContainer extends Serializable {
* @param value
*/
void srem(String setName, String value);

/**
* get redis async commands.
*
* @return
*/
RedisClusterAsyncCommands getAsyncCommands();
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.lettuce.core.RedisFuture;
import io.lettuce.core.api.StatefulRedisConnection;
import io.lettuce.core.api.async.RedisAsyncCommands;
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -421,4 +422,9 @@ public void srem(String setName, String value) {
throw e;
}
}

@Override
public RedisClusterAsyncCommands getAsyncCommands() {
return asyncCommands;
}
}

0 comments on commit 69688a2

Please sign in to comment.