类 RedisClusterContainer
- java.lang.Object
-
- org.apache.flink.streaming.connectors.redis.container.RedisClusterContainer
-
- 所有已实现的接口:
Closeable,Serializable,AutoCloseable,RedisCommandsContainer
public class RedisClusterContainer extends Object implements RedisCommandsContainer, Closeable
Redis command container if we want to connect to a Redis cluster.- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 protected io.lettuce.core.cluster.api.async.RedisAdvancedClusterAsyncCommandsclusterAsyncCommandsprotected io.lettuce.core.cluster.api.StatefulRedisClusterConnection<String,String>connectionprotected io.lettuce.core.cluster.RedisClusterClientredisClusterClient
-
构造器概要
构造器 构造器 说明 RedisClusterContainer(io.lettuce.core.cluster.RedisClusterClient redisClusterClient)Initialize Redis command container for Redis cluster.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Closes theRedisClusterClient.io.lettuce.core.RedisFuture<Long>decrBy(String key, Long value)decrease value from specified key.io.lettuce.core.RedisFuture<Long>del(String key)delete key.io.lettuce.core.RedisFuture<Long>exists(String key)io.lettuce.core.RedisFuture<Boolean>expire(String key, int seconds)expire key with seconds.io.lettuce.core.RedisFuture<String>get(String key)get value by key.io.lettuce.core.cluster.api.async.RedisClusterAsyncCommandsgetAsyncCommands()get redis async commands.io.lettuce.core.RedisFuture<Long>getTTL(String key)get ttl of key.io.lettuce.core.RedisFuture<Long>hdel(String key, String field)delete key in map.io.lettuce.core.RedisFuture<Boolean>hexists(String key, String field)io.lettuce.core.RedisFuture<String>hget(String key, String field)get value by key and field .io.lettuce.core.RedisFuture<Map<String,String>>hgetAll(String key)get all value by key.io.lettuce.core.RedisFuture<Long>hincrBy(String key, String hashField, long value)io.lettuce.core.RedisFuture<Double>hincrByFloat(String key, String hashField, double value)io.lettuce.core.RedisFuture<Boolean>hmset(String key, Map hashField)Sets fields in the hash stored at key to value, with TTL, if needed.io.lettuce.core.RedisFuture<Boolean>hset(String key, String hashField, String value)Sets field in the hash stored at key to value, with TTL, if needed.io.lettuce.core.RedisFuture<Long>incrBy(String key, long value)increase value to specified key.io.lettuce.core.RedisFuture<Double>incrByFloat(String key, double value)increase value to specified key.io.lettuce.core.RedisFuture<Long>lpush(String listName, String value)Insert the specified value at the head of the list stored at key.io.lettuce.core.RedisFuture<List>lRange(String key, long start, long end)voidopen()Open the container.io.lettuce.core.RedisFuture<Long>pfadd(String key, String element)Adds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.io.lettuce.core.RedisFuture<Long>pfcount(String key)io.lettuce.core.RedisFuture<Long>publish(String channelName, String message)Posts a message to the given channel.io.lettuce.core.RedisFuture<Long>rpush(String listName, String value)Insert the specified value at the tail of the list stored at key.io.lettuce.core.RedisFuture<Long>sadd(String setName, String value)Add the specified member to the set stored at key.io.lettuce.core.RedisFuture<String>set(String key, String value)Set key to hold the string value.io.lettuce.core.RedisFuture<List>srandmember(String key, long count)io.lettuce.core.RedisFuture<Long>srem(String setName, String value)delete key value from set.io.lettuce.core.RedisFuture<Long>zadd(String key, double score, String element)Adds the specified member with the specified scores to the sorted set stored at key.io.lettuce.core.RedisFuture<Double>zincrBy(String key, double score, String element)increase the specified member with the specified scores to the sorted set stored at key.io.lettuce.core.RedisFuture<List>zrange(String key, long start, long stop)io.lettuce.core.RedisFuture<Long>zrem(String key, String element)Removes the specified member from the sorted set stored at key.io.lettuce.core.RedisFuture<Long>zremRangeByLex(String key, io.lettuce.core.Range<String> range)Remove members from a specified lex rangeio.lettuce.core.RedisFuture<Long>zremRangeByRank(String key, long start, long stop)Remove members from a specified rankio.lettuce.core.RedisFuture<Long>zremRangeByScore(String key, io.lettuce.core.Range<Double> range)Remove members from a specified score rangeio.lettuce.core.RedisFuture<Double>zscore(String key, String member)
-
-
-
字段详细资料
-
redisClusterClient
protected transient io.lettuce.core.cluster.RedisClusterClient redisClusterClient
-
connection
protected transient io.lettuce.core.cluster.api.StatefulRedisClusterConnection<String,String> connection
-
clusterAsyncCommands
protected transient io.lettuce.core.cluster.api.async.RedisAdvancedClusterAsyncCommands clusterAsyncCommands
-
-
方法详细资料
-
open
public void open()
从接口复制的说明:RedisCommandsContainerOpen the container.- 指定者:
open在接口中RedisCommandsContainer
-
close
public void close()
Closes theRedisClusterClient.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 指定者:
close在接口中RedisCommandsContainer
-
hset
public io.lettuce.core.RedisFuture<Boolean> hset(String key, String hashField, String value)
从接口复制的说明:RedisCommandsContainerSets field in the hash stored at key to value, with TTL, if needed. Setting expire time to key is optional. If key does not exist, a new key holding a hash is created. If field already exists in the hash, it is overwritten.- 指定者:
hset在接口中RedisCommandsContainer- 参数:
key- Hash namehashField- Hash fieldvalue- Hash value
-
hmset
public io.lettuce.core.RedisFuture<Boolean> hmset(String key, Map hashField)
从接口复制的说明:RedisCommandsContainerSets fields in the hash stored at key to value, with TTL, if needed. Setting expire time to key is optional. If key does not exist, a new key holding a hash is created. If key already exists, it is overwritten.- 指定者:
hmset在接口中RedisCommandsContainer- 返回:
-
hincrBy
public io.lettuce.core.RedisFuture<Long> hincrBy(String key, String hashField, long value)
- 指定者:
hincrBy在接口中RedisCommandsContainer- 返回:
-
hincrByFloat
public io.lettuce.core.RedisFuture<Double> hincrByFloat(String key, String hashField, double value)
- 指定者:
hincrByFloat在接口中RedisCommandsContainer- 返回:
-
rpush
public io.lettuce.core.RedisFuture<Long> rpush(String listName, String value)
从接口复制的说明:RedisCommandsContainerInsert the specified value at the tail of the list stored at key. If key does not exist, it is created as empty list before performing the push operation.- 指定者:
rpush在接口中RedisCommandsContainer- 参数:
listName- Name of the Listvalue- Value to be added
-
lpush
public io.lettuce.core.RedisFuture<Long> lpush(String listName, String value)
从接口复制的说明:RedisCommandsContainerInsert the specified value at the head of the list stored at key. If key does not exist, it is created as empty list before performing the push operation.- 指定者:
lpush在接口中RedisCommandsContainer- 参数:
listName- Name of the Listvalue- Value to be added
-
sadd
public io.lettuce.core.RedisFuture<Long> sadd(String setName, String value)
从接口复制的说明:RedisCommandsContainerAdd the specified member to the set stored at key. Specified members that are already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members.- 指定者:
sadd在接口中RedisCommandsContainer- 参数:
setName- Name of the Setvalue- Value to be added
-
publish
public io.lettuce.core.RedisFuture<Long> publish(String channelName, String message)
从接口复制的说明:RedisCommandsContainerPosts a message to the given channel.- 指定者:
publish在接口中RedisCommandsContainer- 参数:
channelName- Name of the channel to which data will be publishedmessage- the message
-
set
public io.lettuce.core.RedisFuture<String> set(String key, String value)
从接口复制的说明:RedisCommandsContainerSet key to hold the string value. If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation.- 指定者:
set在接口中RedisCommandsContainer- 参数:
key- the key name in which value to be setvalue- the value
-
pfadd
public io.lettuce.core.RedisFuture<Long> pfadd(String key, String element)
从接口复制的说明:RedisCommandsContainerAdds all the element arguments to the HyperLogLog data structure stored at the variable name specified as first argument.- 指定者:
pfadd在接口中RedisCommandsContainer- 参数:
key- The name of the keyelement- the element
-
zadd
public io.lettuce.core.RedisFuture<Long> zadd(String key, double score, String element)
从接口复制的说明:RedisCommandsContainerAdds the specified member with the specified scores to the sorted set stored at key.- 指定者:
zadd在接口中RedisCommandsContainer- 参数:
key- The name of the Sorted Setscore- Score of the elementelement- element to be added
-
zincrBy
public io.lettuce.core.RedisFuture<Double> zincrBy(String key, double score, String element)
从接口复制的说明:RedisCommandsContainerincrease the specified member with the specified scores to the sorted set stored at key.- 指定者:
zincrBy在接口中RedisCommandsContainer
-
zrem
public io.lettuce.core.RedisFuture<Long> zrem(String key, String element)
从接口复制的说明:RedisCommandsContainerRemoves the specified member from the sorted set stored at key.- 指定者:
zrem在接口中RedisCommandsContainer- 参数:
key- The name of the Sorted Setelement- element to be removed
-
zremRangeByScore
public io.lettuce.core.RedisFuture<Long> zremRangeByScore(String key, io.lettuce.core.Range<Double> range)
从接口复制的说明:RedisCommandsContainerRemove members from a specified score range- 指定者:
zremRangeByScore在接口中RedisCommandsContainer- 返回:
-
zremRangeByLex
public io.lettuce.core.RedisFuture<Long> zremRangeByLex(String key, io.lettuce.core.Range<String> range)
从接口复制的说明:RedisCommandsContainerRemove members from a specified lex range- 指定者:
zremRangeByLex在接口中RedisCommandsContainer- 返回:
-
zremRangeByRank
public io.lettuce.core.RedisFuture<Long> zremRangeByRank(String key, long start, long stop)
从接口复制的说明:RedisCommandsContainerRemove members from a specified rank- 指定者:
zremRangeByRank在接口中RedisCommandsContainer- 返回:
-
incrBy
public io.lettuce.core.RedisFuture<Long> incrBy(String key, long value)
从接口复制的说明:RedisCommandsContainerincrease value to specified key.- 指定者:
incrBy在接口中RedisCommandsContainer
-
incrByFloat
public io.lettuce.core.RedisFuture<Double> incrByFloat(String key, double value)
从接口复制的说明:RedisCommandsContainerincrease value to specified key.- 指定者:
incrByFloat在接口中RedisCommandsContainer- 返回:
-
decrBy
public io.lettuce.core.RedisFuture<Long> decrBy(String key, Long value)
从接口复制的说明:RedisCommandsContainerdecrease value from specified key.- 指定者:
decrBy在接口中RedisCommandsContainer- 参数:
key- the key name in which value to be setvalue- value the value
-
hdel
public io.lettuce.core.RedisFuture<Long> hdel(String key, String field)
从接口复制的说明:RedisCommandsContainerdelete key in map.- 指定者:
hdel在接口中RedisCommandsContainer
-
del
public io.lettuce.core.RedisFuture<Long> del(String key)
从接口复制的说明:RedisCommandsContainerdelete key.- 指定者:
del在接口中RedisCommandsContainer
-
expire
public io.lettuce.core.RedisFuture<Boolean> expire(String key, int seconds)
从接口复制的说明:RedisCommandsContainerexpire key with seconds.- 指定者:
expire在接口中RedisCommandsContainer- 返回:
-
srem
public io.lettuce.core.RedisFuture<Long> srem(String setName, String value)
从接口复制的说明:RedisCommandsContainerdelete key value from set.- 指定者:
srem在接口中RedisCommandsContainer
-
hget
public io.lettuce.core.RedisFuture<String> hget(String key, String field)
从接口复制的说明:RedisCommandsContainerget value by key and field .- 指定者:
hget在接口中RedisCommandsContainer- 返回:
-
get
public io.lettuce.core.RedisFuture<String> get(String key)
从接口复制的说明:RedisCommandsContainerget value by key.- 指定者:
get在接口中RedisCommandsContainer- 返回:
-
hgetAll
public io.lettuce.core.RedisFuture<Map<String,String>> hgetAll(String key)
从接口复制的说明:RedisCommandsContainerget all value by key.- 指定者:
hgetAll在接口中RedisCommandsContainer- 返回:
-
getAsyncCommands
public io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands getAsyncCommands()
从接口复制的说明:RedisCommandsContainerget redis async commands.- 指定者:
getAsyncCommands在接口中RedisCommandsContainer- 返回:
-
getTTL
public io.lettuce.core.RedisFuture<Long> getTTL(String key)
从接口复制的说明:RedisCommandsContainerget ttl of key.- 指定者:
getTTL在接口中RedisCommandsContainer- 返回:
-
lRange
public io.lettuce.core.RedisFuture<List> lRange(String key, long start, long end)
- 指定者:
lRange在接口中RedisCommandsContainer- 返回:
-
exists
public io.lettuce.core.RedisFuture<Long> exists(String key)
- 指定者:
exists在接口中RedisCommandsContainer- 返回:
-
hexists
public io.lettuce.core.RedisFuture<Boolean> hexists(String key, String field)
- 指定者:
hexists在接口中RedisCommandsContainer- 返回:
-
pfcount
public io.lettuce.core.RedisFuture<Long> pfcount(String key)
- 指定者:
pfcount在接口中RedisCommandsContainer- 返回:
-
zscore
public io.lettuce.core.RedisFuture<Double> zscore(String key, String member)
- 指定者:
zscore在接口中RedisCommandsContainer- 返回:
-
zrange
public io.lettuce.core.RedisFuture<List> zrange(String key, long start, long stop)
- 指定者:
zrange在接口中RedisCommandsContainer- 返回:
-
srandmember
public io.lettuce.core.RedisFuture<List> srandmember(String key, long count)
- 指定者:
srandmember在接口中RedisCommandsContainer- 返回:
-
-