redis.clients.jedis
Class ShardedJedisPipeline

java.lang.Object
  extended by redis.clients.jedis.Queable
      extended by redis.clients.jedis.ShardedJedisPipeline

public class ShardedJedisPipeline
extends Queable


Constructor Summary
ShardedJedisPipeline()
           
 
Method Summary
 Response<Long> append(String key, String value)
           
 Response<Long> decr(String key)
           
 Response<Long> decrBy(String key, long integer)
           
 void execute()
          Deprecated. 
 Response<Boolean> exists(String key)
           
 Response<Long> expire(String key, int seconds)
           
 Response<Long> expireAt(String key, long unixTime)
           
 Response<String> get(String key)
           
 Response<Boolean> getbit(String key, long offset)
           
 Response<Long> getrange(String key, long startOffset, long endOffset)
           
 List<Object> getResults()
           
 Response<String> getSet(String key, String value)
           
 Response<Long> hdel(String key, String field)
           
 Response<Boolean> hexists(String key, String field)
           
 Response<String> hget(String key, String field)
           
 Response<Map<String,String>> hgetAll(String key)
           
 Response<Long> hincrBy(String key, String field, int value)
           
 Response<Set<String>> hkeys(String key)
           
 Response<Long> hlen(String key)
           
 Response<List<String>> hmget(String key, String... fields)
           
 Response<String> hmset(String key, Map<String,String> hash)
           
 Response<Long> hset(String key, String field, String value)
           
 Response<Long> hsetnx(String key, String field, String value)
           
 Response<Set<String>> hvals(String key)
           
 Response<Long> incr(String key)
           
 Response<Long> incrBy(String key, int integer)
           
 Response<String> lindex(String key, int index)
           
 Response<Long> linsert(String key, BinaryClient.LIST_POSITION where, String pivot, String value)
           
 Response<Long> llen(String key)
           
 Response<String> lpop(String key)
           
 Response<Long> lpush(String key, String string)
           
 Response<List<String>> lrange(String key, int start, int end)
           
 Response<Long> lrem(String key, int count, String value)
           
 Response<String> lset(String key, int index, String value)
           
 Response<String> ltrim(String key, int start, int end)
           
 Response<String> rpop(String key)
           
 Response<Long> rpush(String key, String string)
           
 Response<Long> sadd(String key, String member)
           
 Response<Long> scard(String key)
           
 Response<String> set(String key, String value)
           
 Response<Boolean> setbit(String key, long offset, boolean value)
           
 Response<Long> setex(String key, int seconds, String value)
           
 Response<Long> setnx(String key, String value)
           
 Response<Long> setrange(String key, long offset, String value)
           
 void setShardedJedis(BinaryShardedJedis jedis)
           
 Response<Boolean> sismember(String key, String member)
           
 Response<Set<String>> smembers(String key)
           
 Response<Double> sort(String key)
           
 Response<List<String>> sort(String key, SortingParams sortingParameters)
           
 Response<String> spop(String key)
           
 Response<String> srandmember(String key)
           
 Response<Long> srem(String key, String member)
           
 Response<String> substr(String key, int start, int end)
           
 void sync()
          Syncronize pipeline by reading all responses.
 List<Object> syncAndReturnAll()
          Syncronize pipeline by reading all responses.
 Response<Long> ttl(String key)
           
 Response<Boolean> type(String key)
           
 Response<Long> zadd(String key, double score, String member)
           
 Response<Long> zcard(String key)
           
 Response<Long> zcount(String key, double min, double max)
           
 Response<Double> zincrby(String key, double score, String member)
           
 Response<Set<String>> zrange(String key, int start, int end)
           
 Response<Set<String>> zrangeByScore(String key, double min, double max)
           
 Response<Set<String>> zrangeByScore(String key, double min, double max, int offset, int count)
           
 Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min, double max)
           
 Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min, double max, int offset, int count)
           
 Response<Set<Tuple>> zrangeWithScores(String key, int start, int end)
           
 Response<Long> zrank(String key, String member)
           
 Response<Long> zrem(String key, String member)
           
 Response<Long> zremrangeByRank(String key, int start, int end)
           
 Response<Long> zremrangeByScore(String key, double start, double end)
           
 Response<Set<String>> zrevrange(String key, int start, int end)
           
 Response<Set<Tuple>> zrevrangeWithScores(String key, int start, int end)
           
 Response<Long> zrevrank(String key, String member)
           
 Response<Double> zscore(String key, String member)
           
 
Methods inherited from class redis.clients.jedis.Queable
clean, generateResponse, getResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShardedJedisPipeline

public ShardedJedisPipeline()
Method Detail

setShardedJedis

public void setShardedJedis(BinaryShardedJedis jedis)

set

public Response<String> set(String key,
                            String value)

get

public Response<String> get(String key)

exists

public Response<Boolean> exists(String key)

type

public Response<Boolean> type(String key)

expire

public Response<Long> expire(String key,
                             int seconds)

expireAt

public Response<Long> expireAt(String key,
                               long unixTime)

ttl

public Response<Long> ttl(String key)

getSet

public Response<String> getSet(String key,
                               String value)

setnx

public Response<Long> setnx(String key,
                            String value)

setex

public Response<Long> setex(String key,
                            int seconds,
                            String value)

decrBy

public Response<Long> decrBy(String key,
                             long integer)

decr

public Response<Long> decr(String key)

incrBy

public Response<Long> incrBy(String key,
                             int integer)

incr

public Response<Long> incr(String key)

append

public Response<Long> append(String key,
                             String value)

substr

public Response<String> substr(String key,
                               int start,
                               int end)

hset

public Response<Long> hset(String key,
                           String field,
                           String value)

hget

public Response<String> hget(String key,
                             String field)

hsetnx

public Response<Long> hsetnx(String key,
                             String field,
                             String value)

hmset

public Response<String> hmset(String key,
                              Map<String,String> hash)

hmget

public Response<List<String>> hmget(String key,
                                    String... fields)

hincrBy

public Response<Long> hincrBy(String key,
                              String field,
                              int value)

hexists

public Response<Boolean> hexists(String key,
                                 String field)

hdel

public Response<Long> hdel(String key,
                           String field)

hlen

public Response<Long> hlen(String key)

hkeys

public Response<Set<String>> hkeys(String key)

hvals

public Response<Set<String>> hvals(String key)

hgetAll

public Response<Map<String,String>> hgetAll(String key)

rpush

public Response<Long> rpush(String key,
                            String string)

lpush

public Response<Long> lpush(String key,
                            String string)

llen

public Response<Long> llen(String key)

lrange

public Response<List<String>> lrange(String key,
                                     int start,
                                     int end)

ltrim

public Response<String> ltrim(String key,
                              int start,
                              int end)

lindex

public Response<String> lindex(String key,
                               int index)

lset

public Response<String> lset(String key,
                             int index,
                             String value)

lrem

public Response<Long> lrem(String key,
                           int count,
                           String value)

lpop

public Response<String> lpop(String key)

rpop

public Response<String> rpop(String key)

sadd

public Response<Long> sadd(String key,
                           String member)

smembers

public Response<Set<String>> smembers(String key)

srem

public Response<Long> srem(String key,
                           String member)

spop

public Response<String> spop(String key)

scard

public Response<Long> scard(String key)

sismember

public Response<Boolean> sismember(String key,
                                   String member)

srandmember

public Response<String> srandmember(String key)

zadd

public Response<Long> zadd(String key,
                           double score,
                           String member)

zrange

public Response<Set<String>> zrange(String key,
                                    int start,
                                    int end)

zrem

public Response<Long> zrem(String key,
                           String member)

zincrby

public Response<Double> zincrby(String key,
                                double score,
                                String member)

zrank

public Response<Long> zrank(String key,
                            String member)

zrevrank

public Response<Long> zrevrank(String key,
                               String member)

zrevrange

public Response<Set<String>> zrevrange(String key,
                                       int start,
                                       int end)

zrangeWithScores

public Response<Set<Tuple>> zrangeWithScores(String key,
                                             int start,
                                             int end)

zrevrangeWithScores

public Response<Set<Tuple>> zrevrangeWithScores(String key,
                                                int start,
                                                int end)

zcard

public Response<Long> zcard(String key)

zscore

public Response<Double> zscore(String key,
                               String member)

sort

public Response<Double> sort(String key)

sort

public Response<List<String>> sort(String key,
                                   SortingParams sortingParameters)

zcount

public Response<Long> zcount(String key,
                             double min,
                             double max)

zrangeByScore

public Response<Set<String>> zrangeByScore(String key,
                                           double min,
                                           double max)

zrangeByScore

public Response<Set<String>> zrangeByScore(String key,
                                           double min,
                                           double max,
                                           int offset,
                                           int count)

zrangeByScoreWithScores

public Response<Set<Tuple>> zrangeByScoreWithScores(String key,
                                                    double min,
                                                    double max)

zrangeByScoreWithScores

public Response<Set<Tuple>> zrangeByScoreWithScores(String key,
                                                    double min,
                                                    double max,
                                                    int offset,
                                                    int count)

zremrangeByRank

public Response<Long> zremrangeByRank(String key,
                                      int start,
                                      int end)

zremrangeByScore

public Response<Long> zremrangeByScore(String key,
                                       double start,
                                       double end)

linsert

public Response<Long> linsert(String key,
                              BinaryClient.LIST_POSITION where,
                              String pivot,
                              String value)

getbit

public Response<Boolean> getbit(String key,
                                long offset)

setbit

public Response<Boolean> setbit(String key,
                                long offset,
                                boolean value)

setrange

public Response<Long> setrange(String key,
                               long offset,
                               String value)

getrange

public Response<Long> getrange(String key,
                               long startOffset,
                               long endOffset)

getResults

public List<Object> getResults()

sync

public void sync()
Syncronize pipeline by reading all responses. This operation closes the pipeline. In order to get return values from pipelined commands, capture the different Response<?> of the commands you execute.


syncAndReturnAll

public List<Object> syncAndReturnAll()
Syncronize pipeline by reading all responses. This operation closes the pipeline. Whenever possible try to avoid using this version and use ShardedJedisPipeline.sync() as it won't go through all the responses and generate the right response type (usually it is a waste of time).

Returns:
A list of all the responses in the order you executed them.

execute

@Deprecated
public void execute()
Deprecated. 

This method will be removed in Jedis 3.0. Use the methods that return Response's and call sync().



Copyright © 2012. All Rights Reserved.