public static void zset(){
RedisConfig redisConfig = new RedisConfig();
redisConfig.zadd("myset",1d,"第1");
redisConfig.zadd("myset",2d,"第2");
redisConfig.zadd("myset",3d,"第3");
Set<String> myset = redisConfig.zRange("myset", 0, -1);
for (String s : myset) {
System.out.println(s);
}
Set<String> remyset = redisConfig.zRevRange("myset", 0, -1);
for (String s : remyset) {
System.out.println(s);
}
Long countSet = redisConfig.zcard("myset");
System.out.println(countSet);
Double zscore = redisConfig.zscore("myset", "第1");
System.out.println(zscore);
Long zrank = redisConfig.zrank("myset", "第2");
System.out.println(zrank);
Double zscore1 = redisConfig.zscore("myset", "第3");
System.out.println(zscore1);
redisConfig.zrem("myset","第3");
Double zscore2 = redisConfig.zscore("myset", "第3");
System.out.println(zscore2);
redisConfig.close();
}