更新时间:2024-11-28 GMT+08:00
分享

DcsConnetion命令参考

DcsConnection已实现部分RedisConnection的接口。

用户有需要时可以继承重写此类方法。

常用命令使用方式参考如下:
public Long append(@Nonnull byte[] key, @Nonnull byte[] value);
public Boolean expire(@Nonnull byte[] key, long seconds);
public Boolean pExpire(@Nonnull byte[] key, long millis);
public byte[] get(@Nonnull byte[] key);
public byte[] getSet(@Nonnull byte[] key, @Nonnull byte[] value);
public Boolean set(@Nonnull byte[] key, @Nonnull byte[] value);
public Boolean setEx(@Nonnull byte[] key, long seconds, @Nonnull byte[] value);
public Boolean setNX(@Nonnull byte[] key, @Nonnull byte[] value);
public Boolean set(@Nonnull byte[] key, @Nonnull byte[] value, @Nonnull Expiration expiration, @Nonnull SetOption option);
public void setRange(@Nonnull byte[] key, @Nonnull byte[] value, long offset);
public Long exists(@Nonnull byte[]... keys);
public Long del(@Nonnull byte[]... keys);
public Long unlink(@Nonnull byte[]... keys);
public Set<byte[]> keys(@Nonnull byte[] pattern);
public Cursor<byte[]> scan(@Nonnull ScanOptions options);
public DataType type(@Nonnull byte[] key);
public Set<byte[]> sMembers(@Nonnull byte[] key);
public Long sAdd(@Nonnull byte[] key, @Nonnull byte[]... values);
public Long sRem(@Nonnull byte[] key, @Nonnull byte[]... values);
public Boolean sIsMember(@Nonnull byte[] key, @Nonnull byte[] value);
public Boolean zAdd(@Nonnull byte[] key, double score, @Nonnull byte[] value);
public Long zAdd(@Nonnull byte[] key, @Nonnull Set<Tuple> tuples) ;
public Long zAdd(@Nonnull byte[] key, @Nonnull Set<Tuple> set, @Nonnull ZAddArgs zAddArgs);
public Boolean zAdd(@Nonnull byte[] key, double v, @Nonnull byte[] member, @Nonnull ZAddArgs zAddArgs);
public Long zRem(@Nonnull byte[] key, @Nonnull byte[]... values);
public Double zIncrBy(@Nonnull byte[] key, double increment, @Nonnull byte[] value);
public Long zCard(@Nonnull byte[] key);
public Double zScore(@Nonnull byte[] key, @Nonnull byte[] value);
public Long zRemRange(@Nonnull byte[] key, long start, long end);
public Long zRemRangeByLex(@Nonnull byte[] key, @Nonnull Range range);
public Set<byte[]> zRange(@Nonnull byte[] key, long start, long end);
public Set<byte[]> zRevRange(@Nonnull byte[] key, long start, long end);
public Cursor<Tuple> zScan(@Nonnull byte[] key, @Nonnull ScanOptions options);
public Set<byte[]> zRangeByScore(@Nonnull byte[] key, @Nonnull Range range, @Nonnull Limit limit);
public Set<byte[]> zRangeByScore(@Nonnull byte[] key, @Nonnull String min, @Nonnull String max, long offset, long count);
public Long zRemRangeByScore(@Nonnull byte[] key, Range range);
public byte[] hGet(@Nonnull byte[] key, @Nonnull byte[] field);
public Map<byte[], byte[]> hGetAll(@Nonnull byte[] key);
public Boolean hSet(@Nonnull byte[] key, @Nonnull byte[] field, @Nonnull byte[] value);
public Cursor<Map.Entry<byte[], byte[]>> hScan(@Nonnull byte[] key, @Nonnull ScanOptions options);
public void hMSet(@Nonnull byte[] key, @Nonnull Map<byte[], byte[]> hashes);
public Long hDel(@Nonnull byte[] key, @Nonnull byte[]... fields);
public Boolean hExists(@Nonnull byte[] key, @Nonnull byte[] field);
public Set<byte[]> hKeys(@Nonnull byte[] key);
public List<byte[]> hVals(byte[] key);
public Long hIncrBy(@Nonnull byte[] key, @Nonnull byte[] field, long delta);
public Double hIncrBy(@Nonnull byte[] key, @Nonnull byte[] field, double delta);
public List<byte[]> lRange(@Nonnull byte[] key, long start, long end);
public Long rPush(@Nonnull byte[] key, @Nonnull byte[]... values);
public Long lInsert(@Nonnull byte[] key, @Nonnull Position where, @Nonnull byte[] pivot, @Nonnull byte[] value);
public void lSet(@Nonnull byte[] key, long index, @Nonnull byte[] value);
public Long lPush(@Nonnull byte[] key, @Nonnull byte[]... values);
public Long lLen(@Nonnull byte[] key);
public byte[] lPop(@Nonnull byte[] key);
public List<byte[]> bLPop(int timeout, @Nonnull byte[]... keys);
public byte[] rPop(@Nonnull byte[] bytes);
public List<byte[]> bRPop(int i, @Nonnull byte[]... bytes);
public Long incr(@Nonnull byte[] key);
public Long incrBy(@Nonnull byte[] key, long value);
public Double incrBy(@Nonnull byte[] key, double value);
public Long decr(@Nonnull byte[] key);
public Long decrBy(@Nonnull byte[] key, long value);
public Long ttl(@Nonnull byte[] key);
public Long ttl(@Nonnull byte[] key, @Nonnull TimeUnit timeUnit);
public Long pTtl(@Nonnull byte[] key);
public Long pTtl(@Nonnull byte[] key, @Nonnull TimeUnit timeUnit);
public MultiZoneClient getNativeConnection();
public boolean isSubscribed();
public Subscription getSubscription();
public void subscribe(MessageListener listener, byte[]... channels);
public Long publish(byte[] channel, byte[] message);
public void pSubscribe(MessageListener listener, byte[]... patterns);
public <T> T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
public <T> T evalSha(byte[] scriptSha, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
public <T> T evalSha(String scriptSha, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
public void lTrim(byte[] key, long start, long end);
public Long lRem(byte[] key, long count, byte[] value);
public Properties info();
public Properties info(String section);
public String ping();

相关文档