public class RedisConnection extends Object implements RedisCommands
ASKING, AUTH, BGREWRITEAOF, BGSAVE, BITCOUNT, BITOP, BITPOS, BITS_SIZE, BLOCKING_COMMAND_NAMES, BLOCKING_COMMANDS, BLPOP, BLPOP_VALUE, BRPOP, BRPOP_VALUE, BRPOPLPUSH, BZPOPMAX_VALUE, BZPOPMIN_VALUE, CLIENT_GETNAME, CLIENT_LIST, CLIENT_REPLY, CLIENT_SETNAME, CLUSTER_ADDSLOTS, CLUSTER_COUNTKEYSINSLOT, CLUSTER_DELSLOTS, CLUSTER_FORGET, CLUSTER_GETKEYSINSLOT, CLUSTER_INFO, CLUSTER_MEET, CLUSTER_NODES, CLUSTER_NODES_SSL, CLUSTER_REPLICATE, CLUSTER_RESET, CLUSTER_SETSLOT, CLUSTER_SLOTS, CONFIG_GET, CONFIG_RESETSTAT, CONFIG_SET, DBSIZE, DEBUG, DECR, DEL, DEL_BOOL, DEL_OBJECTS, DEL_VOID, DISCARD, DUMP, EVAL_BOOLEAN, EVAL_BOOLEAN_AMOUNT, EVAL_BOOLEAN_SAFE, EVAL_DOUBLE, EVAL_FIRST_LIST, EVAL_INTEGER, EVAL_LIST, EVAL_LONG, EVAL_LONG_SAFE, EVAL_MAP, EVAL_MAP_ENTRY, EVAL_MAP_KEY_SET, EVAL_MAP_VALUE, EVAL_MAP_VALUE_LIST, EVAL_MAP_VALUE_SET, EVAL_NULL_BOOLEAN, EVAL_OBJECT, EVAL_SET, EVAL_SSCAN, EVAL_STRING, EVAL_STRING_DATA, EVAL_VOID, EVAL_ZSCAN, EXEC, EXISTS, EXISTS_LONG, FLUSHALL, FLUSHALL_ASYNC, FLUSHDB, FLUSHDB_ASYNC, GEOADD, GEODIST, GEORADIUS_RO, GEORADIUS_STORE, GEORADIUSBYMEMBER_RO, GEORADIUSBYMEMBER_STORE, GET, GET_DOUBLE, GET_INTEGER, GET_LONG, GETBIT, GETSET, HDEL, HEXISTS, HGET, HGETALL, HGETALL_ENTRY, HKEYS, HLEN, HLEN_LONG, HMSET, HSCAN, HSET, HSET_VOID, HSETNX, HSTRLEN, HVALS, INCR, INCRBY, INCRBYFLOAT, INFO_ALL, INFO_CLIENTS, INFO_CLUSTER, INFO_COMMANDSTATS, INFO_CPU, INFO_DEFAULT, INFO_KEYSPACE, INFO_MEMORY, INFO_PERSISTENCE, INFO_REPLICATION, INFO_SERVER, INFO_STATS, KEYS, KEYSLOT, LASTSAVE, LINDEX, LINSERT_INT, LLEN_INT, LPOP, LPUSH, LPUSH_BOOLEAN, LPUSH_VOID, LRANGE, LRANGE_SET, LREM_SINGLE, LSET, LTRIM, MEMORY_USAGE, MGET, MIGRATE, MOVE, MSET, MSETNX, MULTI, NOT_EXISTS, PERSIST, PEXPIRE, PEXPIREAT, PFADD, PFCOUNT, PFMERGE, PING, PING_BOOL, PSETEX, PSUBSCRIBE, PTTL, PUBLISH, PUBSUB_COMMANDS, PUBSUB_NUMSUB, PUNSUBSCRIBE, QUIT, RANDOM_KEY, READONLY, RENAME, RENAMENX, RESTORE, RPOP, RPOPLPUSH, RPUSH, RPUSH_BOOLEAN, RPUSH_VOID, SADD, SADD_BOOL, SADD_SINGLE, SAVE, SCAN, SCARD, SCARD_INT, SCRIPT_EXISTS, SCRIPT_FLUSH, SCRIPT_KILL, SCRIPT_LOAD, SDIFF, SDIFFSTORE, SDIFFSTORE_INT, SELECT, SENTINEL_FAILOVER, SENTINEL_GET_MASTER_ADDR_BY_NAME, SENTINEL_MASTERS, SENTINEL_MONITOR, SENTINEL_REMOVE, SENTINEL_SENTINELS, SENTINEL_SLAVES, SET, SETBIT, SETBIT_VOID, SETNX, SETPXNX, SHUTDOWN, SINTER, SINTERSTORE, SINTERSTORE_INT, SISMEMBER, SMEMBERS, SMOVE, SORT_LIST, SORT_SET, SORT_TO, SPOP, SPOP_SINGLE, SRANDMEMBER, SRANDMEMBER_SINGLE, SREM_SINGLE, SSCAN, STRLEN, SUBSCRIBE, SUNION, SUNIONSTORE, SUNIONSTORE_INT, TIME, TIME_LONG, TOUCH, TOUCH_LONG, TYPE, UNLINK, UNLINK_BOOL, UNSUBSCRIBE, UNWATCH, WAIT, WATCH, XACK, XADD, XADD_VOID, XCLAIM, XCLAIM_IDS, XDEL, XGROUP, XGROUP_LONG, XINFO_CONSUMERS, XINFO_GROUPS, XLEN, XPENDING, XPENDING_ENTRIES, XRANGE, XREAD, XREAD_BLOCKING, XREAD_BLOCKING_SINGLE, XREAD_SINGLE, XREADGROUP, XREADGROUP_BLOCKING, XREADGROUP_BLOCKING_SINGLE, XREADGROUP_SINGLE, XREVRANGE, XTRIM, ZADD, ZADD_BOOL, ZADD_BOOL_RAW, ZADD_INT, ZADD_NX_BOOL, ZADD_RAW, ZCARD, ZCARD_INT, ZCOUNT, ZINCRBY, ZINTERSTORE_INT, ZLEXCOUNT, ZPOPMAX, ZPOPMIN, ZRANGE, ZRANGE_ENTRY, ZRANGE_SINGLE, ZRANGE_SINGLE_SCORE, ZRANGEBYLEX, ZRANGEBYSCORE, ZRANGEBYSCORE_ENTRY, ZRANGEBYSCORE_LIST, ZRANK, ZRANK_INT, ZREM, ZREM_LONG, ZREMRANGEBYLEX, ZREMRANGEBYRANK, ZREMRANGEBYSCORE, ZREVRANGE, ZREVRANGE_ENTRY, ZREVRANGEBYLEX, ZREVRANGEBYSCORE, ZREVRANGEBYSCORE_ENTRY, ZREVRANK, ZREVRANK_INT, ZSCAN, ZSCORE, ZSCORE_CONTAINS, ZUNIONSTORE_INT
Modifier | Constructor and Description |
---|---|
protected |
RedisConnection(RedisClient redisClient) |
|
RedisConnection(RedisClient redisClient,
io.netty.channel.Channel channel,
RPromise<C> connectionPromise) |
Modifier and Type | Method and Description |
---|---|
<T,R> RFuture<R> |
async(Codec encoder,
RedisCommand<T> command,
Object... params) |
<T,R> RFuture<R> |
async(long timeout,
Codec encoder,
RedisCommand<T> command,
Object... params) |
<T,R> RFuture<R> |
async(long timeout,
RedisCommand<T> command,
Object... params) |
<T,R> RFuture<R> |
async(RedisCommand<T> command,
Object... params) |
<R> R |
await(RFuture<R> future) |
void |
clearFastReconnect() |
io.netty.channel.ChannelFuture |
closeAsync() |
<T,R> CommandData<T,R> |
create(Codec encoder,
RedisCommand<T> command,
Object... params) |
void |
fireConnected() |
void |
fireDisconnected() |
RFuture<Void> |
forceFastReconnectAsync() |
io.netty.channel.Channel |
getChannel()
Access to Netty channel.
|
<C extends RedisConnection> |
getConnectionPromise() |
CommandData<?,?> |
getCurrentCommand() |
static <C extends RedisConnection> |
getFrom(io.netty.channel.Channel channel) |
long |
getLastUsageTime() |
RedisClient |
getRedisClient() |
boolean |
isActive()
Check is channel connected and ready for transfer
|
boolean |
isClosed() |
boolean |
isFastReconnect() |
boolean |
isOpen() |
<T,R> io.netty.channel.ChannelFuture |
send(CommandData<T,R> data) |
io.netty.channel.ChannelFuture |
send(CommandsData data) |
void |
setConnectedListener(Runnable connectedListener) |
void |
setDisconnectedListener(Runnable disconnectedListener) |
void |
setLastUsageTime(long lastUsageTime) |
<T,R> R |
sync(Codec encoder,
RedisCommand<T> command,
Object... params) |
<T> T |
sync(RedisCommand<T> command,
Object... params) |
String |
toString() |
void |
updateChannel(io.netty.channel.Channel channel) |
public RedisConnection(RedisClient redisClient, io.netty.channel.Channel channel, RPromise<C> connectionPromise)
protected RedisConnection(RedisClient redisClient)
public void fireConnected()
public void setConnectedListener(Runnable connectedListener)
public void fireDisconnected()
public void setDisconnectedListener(Runnable disconnectedListener)
public <C extends RedisConnection> RPromise<C> getConnectionPromise()
public static <C extends RedisConnection> C getFrom(io.netty.channel.Channel channel)
public CommandData<?,?> getCurrentCommand()
public long getLastUsageTime()
public void setLastUsageTime(long lastUsageTime)
public boolean isOpen()
public boolean isActive()
public void updateChannel(io.netty.channel.Channel channel)
public RedisClient getRedisClient()
public <R> R await(RFuture<R> future)
public <T> T sync(RedisCommand<T> command, Object... params)
public <T,R> io.netty.channel.ChannelFuture send(CommandData<T,R> data)
public io.netty.channel.ChannelFuture send(CommandsData data)
public <T,R> R sync(Codec encoder, RedisCommand<T> command, Object... params)
public <T,R> RFuture<R> async(RedisCommand<T> command, Object... params)
public <T,R> RFuture<R> async(long timeout, RedisCommand<T> command, Object... params)
public <T,R> RFuture<R> async(Codec encoder, RedisCommand<T> command, Object... params)
public <T,R> RFuture<R> async(long timeout, Codec encoder, RedisCommand<T> command, Object... params)
public <T,R> CommandData<T,R> create(Codec encoder, RedisCommand<T> command, Object... params)
public boolean isClosed()
public boolean isFastReconnect()
public void clearFastReconnect()
public io.netty.channel.Channel getChannel()
public io.netty.channel.ChannelFuture closeAsync()
Copyright © 2014–2020 Redisson. All rights reserved.