redis.clients.jedis
Class ShardedJedis

java.lang.Object
  extended by redis.clients.util.Sharded<Jedis,JedisShardInfo>
      extended by redis.clients.jedis.BinaryShardedJedis
          extended by redis.clients.jedis.ShardedJedis
All Implemented Interfaces:
BinaryJedisCommands, JedisCommands

public class ShardedJedis
extends BinaryShardedJedis
implements JedisCommands


Field Summary
 
Fields inherited from class redis.clients.util.Sharded
DEFAULT_KEY_TAG_PATTERN, DEFAULT_WEIGHT
 
Constructor Summary
ShardedJedis(List<JedisShardInfo> shards)
           
ShardedJedis(List<JedisShardInfo> shards, Hashing algo)
           
ShardedJedis(List<JedisShardInfo> shards, Hashing algo, Pattern keyTagPattern)
           
ShardedJedis(List<JedisShardInfo> shards, Pattern keyTagPattern)
           
 
Method Summary
 Long append(String key, String value)
           
 Long decr(String key)
           
 Long decrBy(String key, int integer)
           
 void disconnect()
           
 Boolean exists(String key)
           
 Long expire(String key, int seconds)
           
 Long expireAt(String key, long unixTime)
           
 String get(String key)
           
 String getSet(String key, String value)
           
 Long hdel(String key, String field)
           
 Boolean hexists(String key, String field)
           
 String hget(String key, String field)
           
 Map<String,String> hgetAll(String key)
           
 Long hincrBy(String key, String field, int value)
           
 Set<String> hkeys(String key)
           
 Long hlen(String key)
           
 List<String> hmget(String key, String... fields)
           
 String hmset(String key, Map<String,String> hash)
           
 Long hset(String key, String field, String value)
           
 Long hsetnx(String key, String field, String value)
           
 Collection<String> hvals(String key)
           
 Long incr(String key)
           
 Long incrBy(String key, int integer)
           
 String lindex(String key, int index)
           
 Long linsert(String key, BinaryClient.LIST_POSITION where, String pivot, String value)
           
 Long llen(String key)
           
 String lpop(String key)
           
 Long lpush(String key, String string)
           
 List<String> lrange(String key, int start, int end)
           
 Long lrem(String key, int count, String value)
           
 String lset(String key, int index, String value)
           
 String ltrim(String key, int start, int end)
           
 String rpop(String key)
           
 Long rpush(String key, String string)
           
 Long sadd(String key, String member)
           
 Long scard(String key)
           
 String set(String key, String value)
           
 String setex(String key, int seconds, String value)
           
 Long setnx(String key, String value)
           
 Boolean sismember(String key, String member)
           
 Set<String> smembers(String key)
           
 List<String> sort(String key)
           
 List<String> sort(String key, SortingParams sortingParameters)
           
 String spop(String key)
           
 String srandmember(String key)
           
 Long srem(String key, String member)
           
 String substr(String key, int start, int end)
           
 Long ttl(String key)
           
 String type(String key)
           
 Long zadd(String key, double score, String member)
           
 Long zcard(String key)
           
 Long zcount(String key, double min, double max)
           
 Double zincrby(String key, double score, String member)
           
 Set<String> zrange(String key, int start, int end)
           
 Set<String> zrangeByScore(String key, double min, double max)
           
 Set<String> zrangeByScore(String key, double min, double max, int offset, int count)
           
 Set<Tuple> zrangeByScoreWithScores(String key, double min, double max)
           
 Set<Tuple> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
           
 Set<Tuple> zrangeWithScores(String key, int start, int end)
           
 Long zrank(String key, String member)
           
 Long zrem(String key, String member)
           
 Long zremrangeByRank(String key, int start, int end)
           
 Long zremrangeByScore(String key, double start, double end)
           
 Set<String> zrevrange(String key, int start, int end)
           
 Set<Tuple> zrevrangeWithScores(String key, int start, int end)
           
 Long zrevrank(String key, String member)
           
 Double zscore(String key, String member)
           
 
Methods inherited from class redis.clients.jedis.BinaryShardedJedis
append, create, decr, decrBy, exists, expire, expireAt, get, getSet, hdel, hexists, hget, hgetAll, hincrBy, hkeys, hlen, hmget, hmset, hset, hsetnx, hvals, incr, incrBy, lindex, linsert, llen, lpop, lpush, lrange, lrem, lset, ltrim, pipelined, rpop, rpush, sadd, scard, set, setex, setnx, sismember, smembers, sort, sort, spop, srandmember, srem, substr, ttl, type, zadd, zcard, zcount, zincrby, zrange, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeWithScores, zrank, zrem, zremrangeByRank, zremrangeByScore, zrevrange, zrevrangeWithScores, zrevrank, zscore
 
Methods inherited from class redis.clients.util.Sharded
getAllShardInfo, getAllShards, getKeyTag, getShard, getShard, getShardInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShardedJedis

public ShardedJedis(List<JedisShardInfo> shards)

ShardedJedis

public ShardedJedis(List<JedisShardInfo> shards,
                    Hashing algo)

ShardedJedis

public ShardedJedis(List<JedisShardInfo> shards,
                    Pattern keyTagPattern)

ShardedJedis

public ShardedJedis(List<JedisShardInfo> shards,
                    Hashing algo,
                    Pattern keyTagPattern)
Method Detail

disconnect

public void disconnect()
                throws IOException
Overrides:
disconnect in class BinaryShardedJedis
Throws:
IOException

set

public String set(String key,
                  String value)
Specified by:
set in interface JedisCommands

get

public String get(String key)
Specified by:
get in interface JedisCommands

exists

public Boolean exists(String key)
Specified by:
exists in interface JedisCommands

type

public String type(String key)
Specified by:
type in interface JedisCommands

expire

public Long expire(String key,
                   int seconds)
Specified by:
expire in interface JedisCommands

expireAt

public Long expireAt(String key,
                     long unixTime)
Specified by:
expireAt in interface JedisCommands

ttl

public Long ttl(String key)
Specified by:
ttl in interface JedisCommands

getSet

public String getSet(String key,
                     String value)
Specified by:
getSet in interface JedisCommands

setnx

public Long setnx(String key,
                  String value)
Specified by:
setnx in interface JedisCommands

setex

public String setex(String key,
                    int seconds,
                    String value)
Specified by:
setex in interface JedisCommands

decrBy

public Long decrBy(String key,
                   int integer)
Specified by:
decrBy in interface JedisCommands

decr

public Long decr(String key)
Specified by:
decr in interface JedisCommands

incrBy

public Long incrBy(String key,
                   int integer)
Specified by:
incrBy in interface JedisCommands

incr

public Long incr(String key)
Specified by:
incr in interface JedisCommands

append

public Long append(String key,
                   String value)
Specified by:
append in interface JedisCommands

substr

public String substr(String key,
                     int start,
                     int end)
Specified by:
substr in interface JedisCommands

hset

public Long hset(String key,
                 String field,
                 String value)
Specified by:
hset in interface JedisCommands

hget

public String hget(String key,
                   String field)
Specified by:
hget in interface JedisCommands

hsetnx

public Long hsetnx(String key,
                   String field,
                   String value)
Specified by:
hsetnx in interface JedisCommands

hmset

public String hmset(String key,
                    Map<String,String> hash)
Specified by:
hmset in interface JedisCommands

hmget

public List<String> hmget(String key,
                          String... fields)
Specified by:
hmget in interface JedisCommands

hincrBy

public Long hincrBy(String key,
                    String field,
                    int value)
Specified by:
hincrBy in interface JedisCommands

hexists

public Boolean hexists(String key,
                       String field)
Specified by:
hexists in interface JedisCommands

hdel

public Long hdel(String key,
                 String field)
Specified by:
hdel in interface JedisCommands

hlen

public Long hlen(String key)
Specified by:
hlen in interface JedisCommands

hkeys

public Set<String> hkeys(String key)
Specified by:
hkeys in interface JedisCommands

hvals

public Collection<String> hvals(String key)
Specified by:
hvals in interface JedisCommands

hgetAll

public Map<String,String> hgetAll(String key)
Specified by:
hgetAll in interface JedisCommands

rpush

public Long rpush(String key,
                  String string)
Specified by:
rpush in interface JedisCommands

lpush

public Long lpush(String key,
                  String string)
Specified by:
lpush in interface JedisCommands

llen

public Long llen(String key)
Specified by:
llen in interface JedisCommands

lrange

public List<String> lrange(String key,
                           int start,
                           int end)
Specified by:
lrange in interface JedisCommands

ltrim

public String ltrim(String key,
                    int start,
                    int end)
Specified by:
ltrim in interface JedisCommands

lindex

public String lindex(String key,
                     int index)
Specified by:
lindex in interface JedisCommands

lset

public String lset(String key,
                   int index,
                   String value)
Specified by:
lset in interface JedisCommands

lrem

public Long lrem(String key,
                 int count,
                 String value)
Specified by:
lrem in interface JedisCommands

lpop

public String lpop(String key)
Specified by:
lpop in interface JedisCommands

rpop

public String rpop(String key)
Specified by:
rpop in interface JedisCommands

sadd

public Long sadd(String key,
                 String member)
Specified by:
sadd in interface JedisCommands

smembers

public Set<String> smembers(String key)
Specified by:
smembers in interface JedisCommands

srem

public Long srem(String key,
                 String member)
Specified by:
srem in interface JedisCommands

spop

public String spop(String key)
Specified by:
spop in interface JedisCommands

scard

public Long scard(String key)
Specified by:
scard in interface JedisCommands

sismember

public Boolean sismember(String key,
                         String member)
Specified by:
sismember in interface JedisCommands

srandmember

public String srandmember(String key)
Specified by:
srandmember in interface JedisCommands

zadd

public Long zadd(String key,
                 double score,
                 String member)
Specified by:
zadd in interface JedisCommands

zrange

public Set<String> zrange(String key,
                          int start,
                          int end)
Specified by:
zrange in interface JedisCommands

zrem

public Long zrem(String key,
                 String member)
Specified by:
zrem in interface JedisCommands

zincrby

public Double zincrby(String key,
                      double score,
                      String member)
Specified by:
zincrby in interface JedisCommands

zrank

public Long zrank(String key,
                  String member)
Specified by:
zrank in interface JedisCommands

zrevrank

public Long zrevrank(String key,
                     String member)
Specified by:
zrevrank in interface JedisCommands

zrevrange

public Set<String> zrevrange(String key,
                             int start,
                             int end)
Specified by:
zrevrange in interface JedisCommands

zrangeWithScores

public Set<Tuple> zrangeWithScores(String key,
                                   int start,
                                   int end)
Specified by:
zrangeWithScores in interface JedisCommands

zrevrangeWithScores

public Set<Tuple> zrevrangeWithScores(String key,
                                      int start,
                                      int end)
Specified by:
zrevrangeWithScores in interface JedisCommands

zcard

public Long zcard(String key)
Specified by:
zcard in interface JedisCommands

zscore

public Double zscore(String key,
                     String member)
Specified by:
zscore in interface JedisCommands

sort

public List<String> sort(String key)
Specified by:
sort in interface JedisCommands

sort

public List<String> sort(String key,
                         SortingParams sortingParameters)
Specified by:
sort in interface JedisCommands

zcount

public Long zcount(String key,
                   double min,
                   double max)
Specified by:
zcount in interface JedisCommands

zrangeByScore

public Set<String> zrangeByScore(String key,
                                 double min,
                                 double max)
Specified by:
zrangeByScore in interface JedisCommands

zrangeByScore

public Set<String> zrangeByScore(String key,
                                 double min,
                                 double max,
                                 int offset,
                                 int count)
Specified by:
zrangeByScore in interface JedisCommands

zrangeByScoreWithScores

public Set<Tuple> zrangeByScoreWithScores(String key,
                                          double min,
                                          double max)
Specified by:
zrangeByScoreWithScores in interface JedisCommands

zrangeByScoreWithScores

public Set<Tuple> zrangeByScoreWithScores(String key,
                                          double min,
                                          double max,
                                          int offset,
                                          int count)
Specified by:
zrangeByScoreWithScores in interface JedisCommands

zremrangeByRank

public Long zremrangeByRank(String key,
                            int start,
                            int end)
Specified by:
zremrangeByRank in interface JedisCommands

zremrangeByScore

public Long zremrangeByScore(String key,
                             double start,
                             double end)
Specified by:
zremrangeByScore in interface JedisCommands

linsert

public Long linsert(String key,
                    BinaryClient.LIST_POSITION where,
                    String pivot,
                    String value)
Specified by:
linsert in interface JedisCommands


Copyright © 2010. All Rights Reserved.