Class DatarouterRedisClient
java.lang.Object
io.datarouter.client.redis.client.DatarouterRedisClient
public class DatarouterRedisClient extends Object
-
Constructor Summary
Constructors Constructor Description DatarouterRedisClient(RedisClientType clientType, io.datarouter.storage.client.ClientId clientId, io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands<byte[],byte[]> lettuceClient) -
Method Summary
Modifier and Type Method Description voiddel(byte[] key, RedisRequestConfig config)booleanexists(byte[] key, RedisRequestConfig config)Optional<byte[]>find(byte[] key, RedisRequestConfig config)io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands<byte[],byte[]>getLettuceClient()Longincrby(byte[] key, int by, RedisRequestConfig config)io.datarouter.scanner.Scanner<io.lettuce.core.KeyValue<byte[],byte[]>>mget(List<byte[]> keys, RedisRequestConfig config)voidpexpire(byte[] key, Duration ttl, RedisRequestConfig config)voidpsetex(io.datarouter.util.tuple.Twin<byte[]> kv, long ttlMs, RedisRequestConfig config)voidset(io.datarouter.util.tuple.Twin<byte[]> kv, RedisRequestConfig config)
-
Constructor Details
-
DatarouterRedisClient
public DatarouterRedisClient(RedisClientType clientType, io.datarouter.storage.client.ClientId clientId, io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands<byte[],byte[]> lettuceClient)
-
-
Method Details
-
getLettuceClient
public io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands<byte[],byte[]> getLettuceClient() -
exists
-
find
-
mget
public io.datarouter.scanner.Scanner<io.lettuce.core.KeyValue<byte[],byte[]>> mget(List<byte[]> keys, RedisRequestConfig config) -
set
-
incrby
-
pexpire
-
psetex
public void psetex(io.datarouter.util.tuple.Twin<byte[]> kv, long ttlMs, RedisRequestConfig config) -
del
-