org.springframework.data.redis.connection
Class DefaultStringRedisConnection

java.lang.Object
  extended by org.springframework.data.redis.connection.DefaultStringRedisConnection
All Implemented Interfaces:
RedisCommands, RedisConnection, RedisConnectionCommands, RedisHashCommands, RedisKeyCommands, RedisListCommands, RedisPubSubCommands, RedisScriptingCommands, RedisServerCommands, RedisSetCommands, RedisStringCommands, RedisTxCommands, RedisZSetCommands, StringRedisConnection

public class DefaultStringRedisConnection
extends Object
implements StringRedisConnection

Default implementation of StringRedisConnection.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.StringRedisConnection
StringRedisConnection.StringTuple
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisStringCommands
RedisStringCommands.BitOperation
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisListCommands
RedisListCommands.Position
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisZSetCommands
RedisZSetCommands.Aggregate, RedisZSetCommands.Tuple
 
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisServerCommands
RedisServerCommands.ShutdownOption
 
Constructor Summary
DefaultStringRedisConnection(RedisConnection connection)
          Constructs a new DefaultStringRedisConnection instance.
DefaultStringRedisConnection(RedisConnection connection, RedisSerializer<String> serializer)
          Constructs a new DefaultStringRedisConnection instance.
 
Method Summary
 Long append(byte[] key, byte[] value)
          Append a value to key.
 Long append(String key, String value)
           
 void bgReWriteAof()
          Start an Append Only File rewrite process on server.
 void bgSave()
          Start background saving of db on server.
 void bgWriteAof()
          Deprecated. As of 1.3, use bgReWriteAof().
 Long bitCount(byte[] key)
          Count the number of set bits (population counting) in value stored at key.
 Long bitCount(byte[] key, long begin, long end)
          Count the number of set bits (population counting) of value stored at key between begin and end.
 Long bitCount(String key)
           
 Long bitCount(String key, long begin, long end)
           
 Long bitOp(RedisStringCommands.BitOperation op, byte[] destination, byte[]... keys)
          Perform bitwise operations between strings.
 Long bitOp(RedisStringCommands.BitOperation op, String destination, String... keys)
           
 List<byte[]> bLPop(int timeout, byte[]... keys)
          Removes and returns first element from lists stored at keys (see: RedisListCommands.lPop(byte[])).
 List<String> bLPop(int timeout, String... keys)
           
 List<byte[]> bRPop(int timeout, byte[]... keys)
          Removes and returns last element from lists stored at keys (see: RedisListCommands.rPop(byte[])).
 List<String> bRPop(int timeout, String... keys)
           
 byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey)
          Remove the last element from list at srcKey, append it to dstKey and return its value (see RedisListCommands.rPopLPush(byte[], byte[])).
 String bRPopLPush(int timeout, String srcKey, String dstKey)
           
 void close()
          Closes (or quits) the connection.
 List<Object> closePipeline()
          Executes the commands in the pipeline and returns their result.
 Long dbSize()
          Get the total number of available keys in currently selected database.
 Long decr(byte[] key)
          Decrement value of key by 1.
 Long decr(String key)
           
 Long decrBy(byte[] key, long value)
          Increment value of key by value.
 Long decrBy(String key, long value)
           
 Long del(byte[]... keys)
          Delete given keys.
 Long del(String... keys)
           
 void discard()
          Discard all commands issued after RedisTxCommands.multi().
 byte[] dump(byte[] key)
          Retrieve serialized version of the value stored at key.
 byte[] echo(byte[] message)
          Returns message via server roundtrip.
 String echo(String message)
           
<T> T
eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
          Evaluate given script.
<T> T
eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs)
          NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here.
<T> T
evalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs)
          Evaluate given scriptSha.
<T> T
evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs)
          NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here.
 List<Object> exec()
          Executes all queued commands in a transaction started with RedisTxCommands.multi().
 Object execute(String command)
           
 Object execute(String command, byte[]... args)
          'Native' or 'raw' execution of the given command along-side the given arguments.
 Object execute(String command, String... args)
           
 Boolean exists(byte[] key)
          Determine if given key exists.
 Boolean exists(String key)
           
 Boolean expire(byte[] key, long seconds)
          Set time to live for given key in seconds.
 Boolean expire(String key, long seconds)
           
 Boolean expireAt(byte[] key, long unixTime)
          Set the expiration for given key as a UNIX timestamp.
 Boolean expireAt(String key, long unixTime)
           
 void flushAll()
          Delete all all keys from all databases.
 void flushDb()
          Delete all keys of the currently selected database.
 byte[] get(byte[] key)
          Get the value of key.
 String get(String key)
           
 Boolean getBit(byte[] key, long offset)
          Get the bit value at offset of value at key.
 Boolean getBit(String key, long offset)
           
 List<RedisClientInfo> getClientList()
          Request information and statistics about connected clients.
 String getClientName()
          Returns the name of the current connection.
 List<String> getConfig(String pattern)
          Load configuration parameters for given pattern from server.
 Object getNativeConnection()
          Returns the native connection (the underlying library/driver object).
 byte[] getRange(byte[] key, long start, long end)
          Get a substring of value of key between begin and end.
 String getRange(String key, long start, long end)
           
 byte[] getSet(byte[] key, byte[] value)
          Set value of key and return its old value.
 String getSet(String key, String value)
           
 Subscription getSubscription()
          Returns the current subscription for this connection or null if the connection is not subscribed.
 Long hDel(byte[] key, byte[]... fields)
          Delete given hash fields.
 Long hDel(String key, String... fields)
           
 Boolean hExists(byte[] key, byte[] field)
          Determine if given hash field exists.
 Boolean hExists(String key, String field)
           
 byte[] hGet(byte[] key, byte[] field)
          Get value for given field from hash at key.
 String hGet(String key, String field)
           
 Map<byte[],byte[]> hGetAll(byte[] key)
          Get entire hash stored at key.
 Map<String,String> hGetAll(String key)
           
 Double hIncrBy(byte[] key, byte[] field, double delta)
          Increment value of a hash field by the given delta.
 Long hIncrBy(byte[] key, byte[] field, long delta)
          Increment value of a hash field by the given delta.
 Double hIncrBy(String key, String field, double delta)
           
 Long hIncrBy(String key, String field, long delta)
           
 Set<byte[]> hKeys(byte[] key)
          Get key set (fields) of hash at key.
 Set<String> hKeys(String key)
           
 Long hLen(byte[] key)
          Get size of hash at key.
 Long hLen(String key)
           
 List<byte[]> hMGet(byte[] key, byte[]... fields)
          Get values for given fields from hash at key.
 List<String> hMGet(String key, String... fields)
           
 void hMSet(byte[] key, Map<byte[],byte[]> hashes)
          Set multiple hash fields to multiple values using data provided in hashes
 void hMSet(String key, Map<String,String> hashes)
           
 Boolean hSet(byte[] key, byte[] field, byte[] value)
          Set the value of a hash field.
 Boolean hSet(String key, String field, String value)
           
 Boolean hSetNX(byte[] key, byte[] field, byte[] value)
          Set the value of a hash field only if field does not exist.
 Boolean hSetNX(String key, String field, String value)
           
 List<byte[]> hVals(byte[] key)
          Get entry set (values) of hash at field.
 List<String> hVals(String key)
           
 Long incr(byte[] key)
          Increment value of key by 1.
 Long incr(String key)
           
 Double incrBy(byte[] key, double value)
          Increment value of key by value.
 Long incrBy(byte[] key, long value)
          Increment value of key by value.
 Double incrBy(String key, double value)
           
 Long incrBy(String key, long value)
           
 Properties info()
          Load default server information like mempory cpu utilization replication
 Properties info(String section)
          Load server information for given selection.
 boolean isClosed()
          Indicates whether the underlying connection is closed or not.
 boolean isPipelined()
          Indicates whether the connection is currently pipelined or not.
 boolean isQueueing()
          Indicates whether the connection is in "queue"(or "MULTI") mode or not.
 boolean isSubscribed()
          Indicates whether the current connection is subscribed (to at least one channel) or not.
 Set<byte[]> keys(byte[] pattern)
          Find all keys matching the given pattern.
 Collection<String> keys(String pattern)
           
 void killClient(String host, int port)
          <<<<<<< HEAD Closes a given client connection identified by ip:port.
 Long lastSave()
          Get time of last RedisServerCommands.bgSave() operation in seconds.
 byte[] lIndex(byte[] key, long index)
          Get element at index form list at key.
 String lIndex(String key, long index)
           
 Long lInsert(byte[] key, RedisListCommands.Position where, byte[] pivot, byte[] value)
          Insert value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.
 Long lInsert(String key, RedisListCommands.Position where, String pivot, String value)
           
 Long lLen(byte[] key)
          Get the size of list stored at key.
 Long lLen(String key)
           
 byte[] lPop(byte[] key)
          Removes and returns first element in list stored at key.
 String lPop(String key)
           
 Long lPush(byte[] key, byte[]... values)
          Prepend values to key.
 Long lPush(String key, String... values)
           
 Long lPushX(byte[] key, byte[] value)
          Prepend values to key only if the list exits.
 Long lPushX(String key, String value)
           
 List<byte[]> lRange(byte[] key, long start, long end)
          Get elements between begin and end from list at key.
 List<String> lRange(String key, long start, long end)
           
 Long lRem(byte[] key, long count, byte[] value)
          Removes the first count occurrences of value from the list stored at key.
 Long lRem(String key, long count, String value)
           
 void lSet(byte[] key, long index, byte[] value)
          Set the value list element at index.
 void lSet(String key, long index, String value)
           
 void lTrim(byte[] key, long start, long end)
          Trim list at key to elements between begin and end.
 void lTrim(String key, long start, long end)
           
 List<byte[]> mGet(byte[]... keys)
          Get the values of all given keys.
 List<String> mGet(String... keys)
           
 Boolean move(byte[] key, int dbIndex)
          Move given key to database with index.
 Boolean move(String key, int dbIndex)
           
 void mSet(Map<byte[],byte[]> tuple)
          Set multiple keys to multiple values using key-value pairs provided in tuple.
 Boolean mSetNX(Map<byte[],byte[]> tuple)
          Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does not exist.
 Boolean mSetNXString(Map<String,String> tuple)
           
 void mSetString(Map<String,String> tuple)
           
 void multi()
          Mark the start of a transaction block.
 void openPipeline()
          Activates the pipeline mode for this connection.
 Boolean persist(byte[] key)
          Remove the expiration from given key.
 Boolean persist(String key)
           
 Boolean pExpire(byte[] key, long millis)
          Set time to live for given key in milliseconds.
 Boolean pExpire(String key, long millis)
           
 Boolean pExpireAt(byte[] key, long unixTimeInMillis)
          Set the expiration for given key as a UNIX timestamp in milliseconds.
 Boolean pExpireAt(String key, long unixTimeInMillis)
           
 String ping()
          Test connection.
 void pSetEx(byte[] key, long milliseconds, byte[] value)
          Set the value and expiration in milliseconds for key.
 void pSetEx(String key, long seconds, String value)
          Set the value and expiration in milliseconds for key.
 void pSubscribe(MessageListener listener, byte[]... patterns)
          Subscribes the connection to all channels matching the given patterns.
 void pSubscribe(MessageListener listener, String... patterns)
           
 Long pTtl(byte[] key)
          Get the time to live for key in milliseconds.
 Long pTtl(String key)
           
 Long publish(byte[] channel, byte[] message)
          Publishes the given message to the given channel.
 Long publish(String channel, String message)
           
 byte[] randomKey()
          Return a random key from the keyspace.
 void rename(byte[] oldName, byte[] newName)
          Rename key oleName to newName.
 void rename(String oldName, String newName)
           
 Boolean renameNX(byte[] oldName, byte[] newName)
          Rename key oleName to newName only if newName does not exist.
 Boolean renameNX(String oldName, String newName)
           
 void resetConfigStats()
          Reset statistic counters on server.
 void restore(byte[] key, long ttlInMillis, byte[] serializedValue)
          Create key using the serializedValue, previously obtained using RedisKeyCommands.dump(byte[]).
 byte[] rPop(byte[] key)
          Removes and returns last element in list stored at key.
 String rPop(String key)
           
 byte[] rPopLPush(byte[] srcKey, byte[] dstKey)
          Remove the last element from list at srcKey, append it to dstKey and return its value.
 String rPopLPush(String srcKey, String dstKey)
           
 Long rPush(byte[] key, byte[]... values)
          Append values to key.
 Long rPush(String key, String... values)
           
 Long rPushX(byte[] key, byte[] value)
          Append values to key only if the list exists.
 Long rPushX(String key, String value)
           
 Long sAdd(byte[] key, byte[]... values)
          Add given values to set at key.
 Long sAdd(String key, String... values)
           
 void save()
          Synchronous save current db snapshot on server.
 Long sCard(byte[] key)
          Get size of set at key.
 Long sCard(String key)
           
 List<Boolean> scriptExists(String... scriptSha1)
          Check if given scriptShas exist in script cache.
 void scriptFlush()
          Flush lua script cache.
 void scriptKill()
          Kill current lua script execution.
 String scriptLoad(byte[] script)
          Load lua script into scripts cache, without executing it.
 String scriptLoad(String script)
           
 Set<byte[]> sDiff(byte[]... keys)
          Diff all sets for given keys.
 Set<String> sDiff(String... keys)
           
 Long sDiffStore(byte[] destKey, byte[]... keys)
          Diff all sets for given keys and store result in destKey
 Long sDiffStore(String destKey, String... keys)
           
 void select(int dbIndex)
          Select the DB with given positive dbIndex.
 void set(byte[] key, byte[] value)
          Set value for key.
 void set(String key, String value)
           
 Boolean setBit(byte[] key, long offset, boolean value)
          Sets the bit at offset in value stored at key.
 Boolean setBit(String key, long offset, boolean value)
          Sets the bit at offset in value stored at key.
 void setClientName(byte[] name)
          Assign given name to current connection.
 void setClientName(String name)
          Assign given name to connection using registered RedisSerializer for name conversion.
 void setConfig(String param, String value)
          Set server configuration for key to value.
 void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
          Specifies if pipelined and tx results should be deserialized to Strings.
 void setEx(byte[] key, long seconds, byte[] value)
          Set the value and expiration in seconds for key.
 void setEx(String key, long seconds, String value)
           
 Boolean setNX(byte[] key, byte[] value)
          Set value for key, only if key does not exist.
 Boolean setNX(String key, String value)
           
 void setRange(byte[] key, byte[] value, long start)
          Overwrite parts of key starting at the specified offset with given value.
 void setRange(String key, String value, long start)
           
 void shutdown()
          Shutdown server.
 void shutdown(RedisServerCommands.ShutdownOption option)
          Shutdown server.
 Set<byte[]> sInter(byte[]... keys)
          Returns the members intersecting all given sets at keys.
 Set<String> sInter(String... keys)
           
 Long sInterStore(byte[] destKey, byte[]... keys)
          Intersect all given sets at keys and store result in destKey.
 Long sInterStore(String destKey, String... keys)
           
 Boolean sIsMember(byte[] key, byte[] value)
          Check if set at key contains value.
 Boolean sIsMember(String key, String value)
           
 void slaveOf(String host, int port)
          Change redis replication setting to new master.
 void slaveOfNoOne()
          Change server into master.
 Set<byte[]> sMembers(byte[] key)
          Get all elements of set at key.
 Set<String> sMembers(String key)
           
 Boolean sMove(byte[] srcKey, byte[] destKey, byte[] value)
          Move value from srcKey to
 Boolean sMove(String srcKey, String destKey, String value)
           
 List<byte[]> sort(byte[] key, SortParameters params)
          Sort the elements for key.
 Long sort(byte[] key, SortParameters params, byte[] storeKey)
          Sort the elements for key and store result in storeKey.
 List<String> sort(String key, SortParameters params)
           
 Long sort(String key, SortParameters params, String storeKey)
           
 byte[] sPop(byte[] key)
          Remove and return a random member from set at key.
 String sPop(String key)
           
 byte[] sRandMember(byte[] key)
          Get random element from set at key.
 List<byte[]> sRandMember(byte[] key, long count)
          Get count random elements from set at key.
 String sRandMember(String key)
           
 List<String> sRandMember(String key, long count)
           
 Long sRem(byte[] key, byte[]... values)
          Remove given values from set at key and return the number of removed elements.
 Long sRem(String key, String... values)
           
 Long strLen(byte[] key)
          Get the length of the value stored at key.
 Long strLen(String key)
           
 void subscribe(MessageListener listener, byte[]... channels)
          Subscribes the connection to the given channels.
 void subscribe(MessageListener listener, String... channels)
           
 Set<byte[]> sUnion(byte[]... keys)
          Union all sets at given keys.
 Set<String> sUnion(String... keys)
           
 Long sUnionStore(byte[] destKey, byte[]... keys)
          Union all sets at given keys and store result in destKey.
 Long sUnionStore(String destKey, String... keys)
           
 Long time()
          Request server timestamp using TIME command.
 Long ttl(byte[] key)
          Get the time to live for key in seconds.
 Long ttl(String key)
           
 DataType type(byte[] key)
          Determine the type stored at key.
 DataType type(String key)
           
 void unwatch()
          Flushes all the previously #watch(byte[]) keys.
 void watch(byte[]... keys)
          Watch given keys for modifications during transaction started with RedisTxCommands.multi().
 Boolean zAdd(byte[] key, double score, byte[] value)
          Add value to a sorted set at key, or update its score if it already exists.
 Long zAdd(byte[] key, Set<RedisZSetCommands.Tuple> tuples)
          Add tuples to a sorted set at key, or update its score if it already exists.
 Boolean zAdd(String key, double score, String value)
           
 Long zAdd(String key, Set<StringRedisConnection.StringTuple> tuples)
           
 Long zCard(byte[] key)
          Get the size of sorted set with key.
 Long zCard(String key)
           
 Long zCount(byte[] key, double min, double max)
          Count number of elements within sorted set with scores between min and max.
 Long zCount(String key, double min, double max)
           
 Double zIncrBy(byte[] key, double increment, byte[] value)
          Increment the score of element with value in sorted set by increment.
 Double zIncrBy(String key, double increment, String value)
           
 Long zInterStore(byte[] destKey, byte[]... sets)
          Intersect sorted sets and store result in destination key.
 Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
          Intersect sorted sets and store result in destination key.
 Long zInterStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
           
 Long zInterStore(String destKey, String... sets)
           
 Set<byte[]> zRange(byte[] key, long start, long end)
          Get elements between begin and end from sorted set.
 Set<String> zRange(String key, long start, long end)
           
 Set<byte[]> zRangeByScore(byte[] key, double min, double max)
          Get elements where score is between min and max from sorted set.
 Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count)
          Get elements in range from begin to end where score is between min and max from sorted set.
 Set<String> zRangeByScore(String key, double min, double max)
           
 Set<String> zRangeByScore(String key, double min, double max, long offset, long count)
           
 Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
          Get set of RedisZSetCommands.Tuples where score is between min and max from sorted set.
 Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
          Get set of RedisZSetCommands.Tuples in range from begin to end where score is between min and max from sorted set.
 Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max)
           
 Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key, double min, double max, long offset, long count)
           
 Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long start, long end)
          Get set of RedisZSetCommands.Tuples between begin and end from sorted set.
 Set<StringRedisConnection.StringTuple> zRangeWithScores(String key, long start, long end)
           
 Long zRank(byte[] key, byte[] value)
          Determine the index of element with value in a sorted set.
 Long zRank(String key, String value)
           
 Long zRem(byte[] key, byte[]... values)
          Remove values from sorted set.
 Long zRem(String key, String... values)
           
 Long zRemRange(byte[] key, long start, long end)
          Remove elements in range between begin and end from sorted set with key.
 Long zRemRange(String key, long start, long end)
           
 Long zRemRangeByScore(byte[] key, double min, double max)
          Remove elements with scores between min and max from sorted set with key.
 Long zRemRangeByScore(String key, double min, double max)
           
 Set<byte[]> zRevRange(byte[] key, long start, long end)
          Get elements in range from begin to end from sorted set ordered high -> low.
 Set<String> zRevRange(String key, long start, long end)
           
 Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
          Get elements where score is between min and max from sorted set ordered high -> low.
 Set<byte[]> zRevRangeByScore(byte[] key, double min, double max, long offset, long count)
          Get elements in range from begin to end where score is between min and max from sorted set ordered high -> low.
 Set<String> zRevRangeByScore(String key, double min, double max)
           
 Set<String> zRevRangeByScore(String key, double min, double max, long offset, long count)
           
 Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max)
          Get set of RedisZSetCommands.Tuple where score is between min and max from sorted set ordered high -> low.
 Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
          Get set of RedisZSetCommands.Tuple in range from begin to end where score is between min and max from sorted set ordered high -> low.
 Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max)
           
 Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count)
           
 Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key, long start, long end)
          Get set of RedisZSetCommands.Tuples in range from begin to end from sorted set ordered high -> low.
 Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key, long start, long end)
           
 Long zRevRank(byte[] key, byte[] value)
          Determine the index of element with value in a sorted set when scored high to low.
 Long zRevRank(String key, String value)
           
 Double zScore(byte[] key, byte[] value)
          Get the score of element with value from sorted set with key key.
 Double zScore(String key, String value)
           
 Long zUnionStore(byte[] destKey, byte[]... sets)
          Union sorted sets and store result in destination key.
 Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
          Union sorted sets and store result in destination key.
 Long zUnionStore(String destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, String... sets)
           
 Long zUnionStore(String destKey, String... sets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStringRedisConnection

public DefaultStringRedisConnection(RedisConnection connection)
Constructs a new DefaultStringRedisConnection instance. Uses StringRedisSerializer as underlying serializer.

Parameters:
connection - Redis connection

DefaultStringRedisConnection

public DefaultStringRedisConnection(RedisConnection connection,
                                    RedisSerializer<String> serializer)
Constructs a new DefaultStringRedisConnection instance.

Parameters:
connection - Redis connection
serializer - String serializer
Method Detail

append

public Long append(byte[] key,
                   byte[] value)
Description copied from interface: RedisStringCommands
Append a value to key.

Specified by:
append in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/append

bgSave

public void bgSave()
Description copied from interface: RedisServerCommands
Start background saving of db on server.

Specified by:
bgSave in interface RedisServerCommands
See Also:
http://redis.io/commands/bgsave

bgReWriteAof

public void bgReWriteAof()
Description copied from interface: RedisServerCommands
Start an Append Only File rewrite process on server.

Specified by:
bgReWriteAof in interface RedisServerCommands
See Also:
http://redis.io/commands/bgrewriteaof

bgWriteAof

@Deprecated
public void bgWriteAof()
Deprecated. As of 1.3, use bgReWriteAof().

Description copied from interface: RedisServerCommands
Start an Append Only File rewrite process on server.

Specified by:
bgWriteAof in interface RedisServerCommands
See Also:
http://redis.io/commands/bgrewriteaof

bLPop

public List<byte[]> bLPop(int timeout,
                          byte[]... keys)
Description copied from interface: RedisListCommands
Removes and returns first element from lists stored at keys (see: RedisListCommands.lPop(byte[])).
Blocks connection until element available or timeout reached.

Specified by:
bLPop in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/blpop

bRPop

public List<byte[]> bRPop(int timeout,
                          byte[]... keys)
Description copied from interface: RedisListCommands
Removes and returns last element from lists stored at keys (see: RedisListCommands.rPop(byte[])).
Blocks connection until element available or timeout reached.

Specified by:
bRPop in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/brpop

bRPopLPush

public byte[] bRPopLPush(int timeout,
                         byte[] srcKey,
                         byte[] dstKey)
Description copied from interface: RedisListCommands
Remove the last element from list at srcKey, append it to dstKey and return its value (see RedisListCommands.rPopLPush(byte[], byte[])).
Blocks connection until element available or timeout reached.

Specified by:
bRPopLPush in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/brpoplpush

close

public void close()
           throws RedisSystemException
Description copied from interface: RedisConnection
Closes (or quits) the connection.

Specified by:
close in interface RedisConnection
Throws:
RedisSystemException

dbSize

public Long dbSize()
Description copied from interface: RedisServerCommands
Get the total number of available keys in currently selected database.

Specified by:
dbSize in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/dbsize

decr

public Long decr(byte[] key)
Description copied from interface: RedisStringCommands
Decrement value of key by 1.

Specified by:
decr in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/decr

decrBy

public Long decrBy(byte[] key,
                   long value)
Description copied from interface: RedisStringCommands
Increment value of key by value.

Specified by:
decrBy in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/decrby

del

public Long del(byte[]... keys)
Description copied from interface: RedisKeyCommands
Delete given keys.

Specified by:
del in interface RedisKeyCommands
Returns:
The number of keys that were removed.
See Also:
http://redis.io/commands/del

discard

public void discard()
Description copied from interface: RedisTxCommands
Discard all commands issued after RedisTxCommands.multi().

Specified by:
discard in interface RedisTxCommands
See Also:
http://redis.io/commands/discard

echo

public byte[] echo(byte[] message)
Description copied from interface: RedisConnectionCommands
Returns message via server roundtrip.

Specified by:
echo in interface RedisConnectionCommands
Returns:
See Also:
http://redis.io/commands/echo

exec

public List<Object> exec()
Description copied from interface: RedisTxCommands
Executes all queued commands in a transaction started with RedisTxCommands.multi().
If used along with #watch(byte[]) the operation will fail if any of watched keys has been modified.

Specified by:
exec in interface RedisTxCommands
Returns:
List of replies for each executed command.
See Also:
http://redis.io/commands/exec

exists

public Boolean exists(byte[] key)
Description copied from interface: RedisKeyCommands
Determine if given key exists.

Specified by:
exists in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/exists

expire

public Boolean expire(byte[] key,
                      long seconds)
Description copied from interface: RedisKeyCommands
Set time to live for given key in seconds.

Specified by:
expire in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/expire

expireAt

public Boolean expireAt(byte[] key,
                        long unixTime)
Description copied from interface: RedisKeyCommands
Set the expiration for given key as a UNIX timestamp.

Specified by:
expireAt in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/expireat

flushAll

public void flushAll()
Description copied from interface: RedisServerCommands
Delete all all keys from all databases.

Specified by:
flushAll in interface RedisServerCommands
See Also:
http://redis.io/commands/flushall

flushDb

public void flushDb()
Description copied from interface: RedisServerCommands
Delete all keys of the currently selected database.

Specified by:
flushDb in interface RedisServerCommands
See Also:
http://redis.io/commands/flushdb

get

public byte[] get(byte[] key)
Description copied from interface: RedisStringCommands
Get the value of key.

Specified by:
get in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/get

getBit

public Boolean getBit(byte[] key,
                      long offset)
Description copied from interface: RedisStringCommands
Get the bit value at offset of value at key.

Specified by:
getBit in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/getbit

getConfig

public List<String> getConfig(String pattern)
Description copied from interface: RedisServerCommands
Load configuration parameters for given pattern from server.

Specified by:
getConfig in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/config-get

getNativeConnection

public Object getNativeConnection()
Description copied from interface: RedisConnection
Returns the native connection (the underlying library/driver object).

Specified by:
getNativeConnection in interface RedisConnection
Returns:
underlying, native object

getRange

public byte[] getRange(byte[] key,
                       long start,
                       long end)
Description copied from interface: RedisStringCommands
Get a substring of value of key between begin and end.

Specified by:
getRange in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/getrange

getSet

public byte[] getSet(byte[] key,
                     byte[] value)
Description copied from interface: RedisStringCommands
Set value of key and return its old value.

Specified by:
getSet in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/getset

getSubscription

public Subscription getSubscription()
Description copied from interface: RedisPubSubCommands
Returns the current subscription for this connection or null if the connection is not subscribed.

Specified by:
getSubscription in interface RedisPubSubCommands
Returns:
the current subscription, null if none is available

hDel

public Long hDel(byte[] key,
                 byte[]... fields)
Description copied from interface: RedisHashCommands
Delete given hash fields.

Specified by:
hDel in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hdel

hExists

public Boolean hExists(byte[] key,
                       byte[] field)
Description copied from interface: RedisHashCommands
Determine if given hash field exists.

Specified by:
hExists in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hexits

hGet

public byte[] hGet(byte[] key,
                   byte[] field)
Description copied from interface: RedisHashCommands
Get value for given field from hash at key.

Specified by:
hGet in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hget

hGetAll

public Map<byte[],byte[]> hGetAll(byte[] key)
Description copied from interface: RedisHashCommands
Get entire hash stored at key.

Specified by:
hGetAll in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hgetall

hIncrBy

public Long hIncrBy(byte[] key,
                    byte[] field,
                    long delta)
Description copied from interface: RedisHashCommands
Increment value of a hash field by the given delta.

Specified by:
hIncrBy in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hincrby

hIncrBy

public Double hIncrBy(byte[] key,
                      byte[] field,
                      double delta)
Description copied from interface: RedisHashCommands
Increment value of a hash field by the given delta.

Specified by:
hIncrBy in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hincrbyfloat

hKeys

public Set<byte[]> hKeys(byte[] key)
Description copied from interface: RedisHashCommands
Get key set (fields) of hash at key.

Specified by:
hKeys in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/h?

hLen

public Long hLen(byte[] key)
Description copied from interface: RedisHashCommands
Get size of hash at key.

Specified by:
hLen in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hlen

hMGet

public List<byte[]> hMGet(byte[] key,
                          byte[]... fields)
Description copied from interface: RedisHashCommands
Get values for given fields from hash at key.

Specified by:
hMGet in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hmget

hMSet

public void hMSet(byte[] key,
                  Map<byte[],byte[]> hashes)
Description copied from interface: RedisHashCommands
Set multiple hash fields to multiple values using data provided in hashes

Specified by:
hMSet in interface RedisHashCommands
See Also:
http://redis.io/commands/hmset

hSet

public Boolean hSet(byte[] key,
                    byte[] field,
                    byte[] value)
Description copied from interface: RedisHashCommands
Set the value of a hash field.

Specified by:
hSet in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hset

hSetNX

public Boolean hSetNX(byte[] key,
                      byte[] field,
                      byte[] value)
Description copied from interface: RedisHashCommands
Set the value of a hash field only if field does not exist.

Specified by:
hSetNX in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hsetnx

hVals

public List<byte[]> hVals(byte[] key)
Description copied from interface: RedisHashCommands
Get entry set (values) of hash at field.

Specified by:
hVals in interface RedisHashCommands
Returns:
See Also:
http://redis.io/commands/hvals

incr

public Long incr(byte[] key)
Description copied from interface: RedisStringCommands
Increment value of key by 1.

Specified by:
incr in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/incr

incrBy

public Long incrBy(byte[] key,
                   long value)
Description copied from interface: RedisStringCommands
Increment value of key by value.

Specified by:
incrBy in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/incrby

incrBy

public Double incrBy(byte[] key,
                     double value)
Description copied from interface: RedisStringCommands
Increment value of key by value.

Specified by:
incrBy in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/incrbyfloat

info

public Properties info()
Description copied from interface: RedisServerCommands
Load default server information like

Specified by:
info in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/info

info

public Properties info(String section)
Description copied from interface: RedisServerCommands
Load server information for given selection.

Specified by:
info in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/info

isClosed

public boolean isClosed()
Description copied from interface: RedisConnection
Indicates whether the underlying connection is closed or not.

Specified by:
isClosed in interface RedisConnection
Returns:
true if the connection is closed, false otherwise.

isQueueing

public boolean isQueueing()
Description copied from interface: RedisConnection
Indicates whether the connection is in "queue"(or "MULTI") mode or not. When queueing, all commands are postponed until EXEC or DISCARD commands are issued. Since in queueing no results are returned, the connection will return NULL on all operations that interact with the data.

Specified by:
isQueueing in interface RedisConnection
Returns:
true if the connection is in queue/MULTI mode, false otherwise

isSubscribed

public boolean isSubscribed()
Description copied from interface: RedisPubSubCommands
Indicates whether the current connection is subscribed (to at least one channel) or not.

Specified by:
isSubscribed in interface RedisPubSubCommands
Returns:
true if the connection is subscribed, false otherwise

keys

public Set<byte[]> keys(byte[] pattern)
Description copied from interface: RedisKeyCommands
Find all keys matching the given pattern.

Specified by:
keys in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/keys

lastSave

public Long lastSave()
Description copied from interface: RedisServerCommands
Get time of last RedisServerCommands.bgSave() operation in seconds.

Specified by:
lastSave in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/lastsave

lIndex

public byte[] lIndex(byte[] key,
                     long index)
Description copied from interface: RedisListCommands
Get element at index form list at key.

Specified by:
lIndex in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lindex

lInsert

public Long lInsert(byte[] key,
                    RedisListCommands.Position where,
                    byte[] pivot,
                    byte[] value)
Description copied from interface: RedisListCommands
Insert value RedisListCommands.Position.BEFORE or RedisListCommands.Position.AFTER existing pivot for key.

Specified by:
lInsert in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/linsert

lLen

public Long lLen(byte[] key)
Description copied from interface: RedisListCommands
Get the size of list stored at key.

Specified by:
lLen in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/llen

lPop

public byte[] lPop(byte[] key)
Description copied from interface: RedisListCommands
Removes and returns first element in list stored at key.

Specified by:
lPop in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lpop

lPush

public Long lPush(byte[] key,
                  byte[]... values)
Description copied from interface: RedisListCommands
Prepend values to key.

Specified by:
lPush in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lpush

lPushX

public Long lPushX(byte[] key,
                   byte[] value)
Description copied from interface: RedisListCommands
Prepend values to key only if the list exits.

Specified by:
lPushX in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lpushx

lRange

public List<byte[]> lRange(byte[] key,
                           long start,
                           long end)
Description copied from interface: RedisListCommands
Get elements between begin and end from list at key.

Specified by:
lRange in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lrange

lRem

public Long lRem(byte[] key,
                 long count,
                 byte[] value)
Description copied from interface: RedisListCommands
Removes the first count occurrences of value from the list stored at key.

Specified by:
lRem in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/lrem

lSet

public void lSet(byte[] key,
                 long index,
                 byte[] value)
Description copied from interface: RedisListCommands
Set the value list element at index.

Specified by:
lSet in interface RedisListCommands
See Also:
http://redis.io/commands/lset

lTrim

public void lTrim(byte[] key,
                  long start,
                  long end)
Description copied from interface: RedisListCommands
Trim list at key to elements between begin and end.

Specified by:
lTrim in interface RedisListCommands
See Also:
http://redis.io/commands/ltrim

mGet

public List<byte[]> mGet(byte[]... keys)
Description copied from interface: RedisStringCommands
Get the values of all given keys.

Specified by:
mGet in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/mget

mSet

public void mSet(Map<byte[],byte[]> tuple)
Description copied from interface: RedisStringCommands
Set multiple keys to multiple values using key-value pairs provided in tuple.

Specified by:
mSet in interface RedisStringCommands
See Also:
http://redis.io/commands/mset

mSetNX

public Boolean mSetNX(Map<byte[],byte[]> tuple)
Description copied from interface: RedisStringCommands
Set multiple keys to multiple values using key-value pairs provided in tuple only if the provided key does not exist.

Specified by:
mSetNX in interface RedisStringCommands
See Also:
http://redis.io/commands/msetnx

multi

public void multi()
Description copied from interface: RedisTxCommands
Mark the start of a transaction block.
Commands will be queued and can then be executed by calling RedisTxCommands.exec() or rolled back using RedisTxCommands.discard() .

Specified by:
multi in interface RedisTxCommands
See Also:
http://redis.io/commands/multi

persist

public Boolean persist(byte[] key)
Description copied from interface: RedisKeyCommands
Remove the expiration from given key.

Specified by:
persist in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/persist

move

public Boolean move(byte[] key,
                    int dbIndex)
Description copied from interface: RedisKeyCommands
Move given key to database with index.

Specified by:
move in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/move

ping

public String ping()
Description copied from interface: RedisConnectionCommands
Test connection.

Specified by:
ping in interface RedisConnectionCommands
Returns:
Server response message - usually PONG.
See Also:
http://redis.io/commands/ping

pSubscribe

public void pSubscribe(MessageListener listener,
                       byte[]... patterns)
Description copied from interface: RedisPubSubCommands
Subscribes the connection to all channels matching the given patterns. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.

Note that this operation is blocking and the current thread starts waiting for new messages immediately.

Specified by:
pSubscribe in interface RedisPubSubCommands
Parameters:
listener - message listener
patterns - channel name patterns

publish

public Long publish(byte[] channel,
                    byte[] message)
Description copied from interface: RedisPubSubCommands
Publishes the given message to the given channel.

Specified by:
publish in interface RedisPubSubCommands
Parameters:
channel - the channel to publish to
message - message to publish
Returns:
the number of clients that received the message

randomKey

public byte[] randomKey()
Description copied from interface: RedisKeyCommands
Return a random key from the keyspace.

Specified by:
randomKey in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/randomkey

rename

public void rename(byte[] oldName,
                   byte[] newName)
Description copied from interface: RedisKeyCommands
Rename key oleName to newName.

Specified by:
rename in interface RedisKeyCommands
See Also:
http://redis.io/commands/rename

renameNX

public Boolean renameNX(byte[] oldName,
                        byte[] newName)
Description copied from interface: RedisKeyCommands
Rename key oleName to newName only if newName does not exist.

Specified by:
renameNX in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/renamenx

resetConfigStats

public void resetConfigStats()
Description copied from interface: RedisServerCommands
Reset statistic counters on server.
Counters can be retrieved using RedisServerCommands.info().

Specified by:
resetConfigStats in interface RedisServerCommands
See Also:
http://redis.io/commands/config-resetstat

rPop

public byte[] rPop(byte[] key)
Description copied from interface: RedisListCommands
Removes and returns last element in list stored at key.

Specified by:
rPop in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/rpop

rPopLPush

public byte[] rPopLPush(byte[] srcKey,
                        byte[] dstKey)
Description copied from interface: RedisListCommands
Remove the last element from list at srcKey, append it to dstKey and return its value.

Specified by:
rPopLPush in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/rpoplpush

rPush

public Long rPush(byte[] key,
                  byte[]... values)
Description copied from interface: RedisListCommands
Append values to key.

Specified by:
rPush in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/rpush

rPushX

public Long rPushX(byte[] key,
                   byte[] value)
Description copied from interface: RedisListCommands
Append values to key only if the list exists.

Specified by:
rPushX in interface RedisListCommands
Returns:
See Also:
http://redis.io/commands/rpushx

sAdd

public Long sAdd(byte[] key,
                 byte[]... values)
Description copied from interface: RedisSetCommands
Add given values to set at key.

Specified by:
sAdd in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sadd

save

public void save()
Description copied from interface: RedisServerCommands
Synchronous save current db snapshot on server.

Specified by:
save in interface RedisServerCommands
See Also:
http://redis.io/commands/save

sCard

public Long sCard(byte[] key)
Description copied from interface: RedisSetCommands
Get size of set at key.

Specified by:
sCard in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/scard

sDiff

public Set<byte[]> sDiff(byte[]... keys)
Description copied from interface: RedisSetCommands
Diff all sets for given keys.

Specified by:
sDiff in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sdiff

sDiffStore

public Long sDiffStore(byte[] destKey,
                       byte[]... keys)
Description copied from interface: RedisSetCommands
Diff all sets for given keys and store result in destKey

Specified by:
sDiffStore in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sdiffstore

select

public void select(int dbIndex)
Description copied from interface: RedisConnectionCommands
Select the DB with given positive dbIndex.

Specified by:
select in interface RedisConnectionCommands
See Also:
http://redis.io/commands/select

set

public void set(byte[] key,
                byte[] value)
Description copied from interface: RedisStringCommands
Set value for key.

Specified by:
set in interface RedisStringCommands
See Also:
http://redis.io/commands/set

setBit

public Boolean setBit(byte[] key,
                      long offset,
                      boolean value)
Description copied from interface: RedisStringCommands
Sets the bit at offset in value stored at key.

Specified by:
setBit in interface RedisStringCommands
Returns:
the original bit value stored at offset.
See Also:
http://redis.io/commands/setbit

setConfig

public void setConfig(String param,
                      String value)
Description copied from interface: RedisServerCommands
Set server configuration for key to value.

Specified by:
setConfig in interface RedisServerCommands
See Also:
http://redis.io/commands/config-set

setEx

public void setEx(byte[] key,
                  long seconds,
                  byte[] value)
Description copied from interface: RedisStringCommands
Set the value and expiration in seconds for key.

Specified by:
setEx in interface RedisStringCommands
See Also:
http://redis.io/commands/setex

pSetEx

public void pSetEx(byte[] key,
                   long milliseconds,
                   byte[] value)
Description copied from interface: RedisStringCommands
Set the value and expiration in milliseconds for key.

Specified by:
pSetEx in interface RedisStringCommands
See Also:
http://redis.io/commands/psetex

setNX

public Boolean setNX(byte[] key,
                     byte[] value)
Description copied from interface: RedisStringCommands
Set value for key, only if key does not exist.

Specified by:
setNX in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/setnx

setRange

public void setRange(byte[] key,
                     byte[] value,
                     long start)
Description copied from interface: RedisStringCommands
Overwrite parts of key starting at the specified offset with given value.

Specified by:
setRange in interface RedisStringCommands
See Also:
http://redis.io/commands/setrange

shutdown

public void shutdown()
Description copied from interface: RedisServerCommands
Shutdown server.

Specified by:
shutdown in interface RedisServerCommands
See Also:
http://redis.io/commands/shutdown

shutdown

public void shutdown(RedisServerCommands.ShutdownOption option)
Description copied from interface: RedisServerCommands
Shutdown server.

Specified by:
shutdown in interface RedisServerCommands
See Also:
http://redis.io/commands/shutdown

sInter

public Set<byte[]> sInter(byte[]... keys)
Description copied from interface: RedisSetCommands
Returns the members intersecting all given sets at keys.

Specified by:
sInter in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sinter

sInterStore

public Long sInterStore(byte[] destKey,
                        byte[]... keys)
Description copied from interface: RedisSetCommands
Intersect all given sets at keys and store result in destKey.

Specified by:
sInterStore in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sinterstore

sIsMember

public Boolean sIsMember(byte[] key,
                         byte[] value)
Description copied from interface: RedisSetCommands
Check if set at key contains value.

Specified by:
sIsMember in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sismember

sMembers

public Set<byte[]> sMembers(byte[] key)
Description copied from interface: RedisSetCommands
Get all elements of set at key.

Specified by:
sMembers in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/smembers

sMove

public Boolean sMove(byte[] srcKey,
                     byte[] destKey,
                     byte[] value)
Description copied from interface: RedisSetCommands
Move value from srcKey to

Specified by:
sMove in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/smove

sort

public Long sort(byte[] key,
                 SortParameters params,
                 byte[] storeKey)
Description copied from interface: RedisKeyCommands
Sort the elements for key and store result in storeKey.

Specified by:
sort in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/sort

sort

public List<byte[]> sort(byte[] key,
                         SortParameters params)
Description copied from interface: RedisKeyCommands
Sort the elements for key.

Specified by:
sort in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/sort

sPop

public byte[] sPop(byte[] key)
Description copied from interface: RedisSetCommands
Remove and return a random member from set at key.

Specified by:
sPop in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/spop

sRandMember

public byte[] sRandMember(byte[] key)
Description copied from interface: RedisSetCommands
Get random element from set at key.

Specified by:
sRandMember in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/srandmember

sRandMember

public List<byte[]> sRandMember(byte[] key,
                                long count)
Description copied from interface: RedisSetCommands
Get count random elements from set at key.

Specified by:
sRandMember in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/srandmember

sRem

public Long sRem(byte[] key,
                 byte[]... values)
Description copied from interface: RedisSetCommands
Remove given values from set at key and return the number of removed elements.

Specified by:
sRem in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/srem

strLen

public Long strLen(byte[] key)
Description copied from interface: RedisStringCommands
Get the length of the value stored at key.

Specified by:
strLen in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/strlen

bitCount

public Long bitCount(byte[] key)
Description copied from interface: RedisStringCommands
Count the number of set bits (population counting) in value stored at key.

Specified by:
bitCount in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/bitcount

bitCount

public Long bitCount(byte[] key,
                     long begin,
                     long end)
Description copied from interface: RedisStringCommands
Count the number of set bits (population counting) of value stored at key between begin and end.

Specified by:
bitCount in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/bitcount

bitOp

public Long bitOp(RedisStringCommands.BitOperation op,
                  byte[] destination,
                  byte[]... keys)
Description copied from interface: RedisStringCommands
Perform bitwise operations between strings.

Specified by:
bitOp in interface RedisStringCommands
Returns:
See Also:
http://redis.io/commands/bitop

subscribe

public void subscribe(MessageListener listener,
                      byte[]... channels)
Description copied from interface: RedisPubSubCommands
Subscribes the connection to the given channels. Once subscribed, a connection enters listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.

Note that this operation is blocking and the current thread starts waiting for new messages immediately.

Specified by:
subscribe in interface RedisPubSubCommands
Parameters:
listener - message listener
channels - channel names

sUnion

public Set<byte[]> sUnion(byte[]... keys)
Description copied from interface: RedisSetCommands
Union all sets at given keys.

Specified by:
sUnion in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sunion

sUnionStore

public Long sUnionStore(byte[] destKey,
                        byte[]... keys)
Description copied from interface: RedisSetCommands
Union all sets at given keys and store result in destKey.

Specified by:
sUnionStore in interface RedisSetCommands
Returns:
See Also:
http://redis.io/commands/sunionstore

ttl

public Long ttl(byte[] key)
Description copied from interface: RedisKeyCommands
Get the time to live for key in seconds.

Specified by:
ttl in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/ttl

type

public DataType type(byte[] key)
Description copied from interface: RedisKeyCommands
Determine the type stored at key.

Specified by:
type in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/type

unwatch

public void unwatch()
Description copied from interface: RedisTxCommands
Flushes all the previously #watch(byte[]) keys.

Specified by:
unwatch in interface RedisTxCommands
See Also:
http://redis.io/commands/unwatch

watch

public void watch(byte[]... keys)
Description copied from interface: RedisTxCommands
Watch given keys for modifications during transaction started with RedisTxCommands.multi().

Specified by:
watch in interface RedisTxCommands
See Also:
http://redis.io/commands/watch

zAdd

public Boolean zAdd(byte[] key,
                    double score,
                    byte[] value)
Description copied from interface: RedisZSetCommands
Add value to a sorted set at key, or update its score if it already exists.

Specified by:
zAdd in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zadd

zAdd

public Long zAdd(byte[] key,
                 Set<RedisZSetCommands.Tuple> tuples)
Description copied from interface: RedisZSetCommands
Add tuples to a sorted set at key, or update its score if it already exists.

Specified by:
zAdd in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zadd

zCard

public Long zCard(byte[] key)
Description copied from interface: RedisZSetCommands
Get the size of sorted set with key.

Specified by:
zCard in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zcard

zCount

public Long zCount(byte[] key,
                   double min,
                   double max)
Description copied from interface: RedisZSetCommands
Count number of elements within sorted set with scores between min and max.

Specified by:
zCount in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zcount

zIncrBy

public Double zIncrBy(byte[] key,
                      double increment,
                      byte[] value)
Description copied from interface: RedisZSetCommands
Increment the score of element with value in sorted set by increment.

Specified by:
zIncrBy in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zincrby

zInterStore

public Long zInterStore(byte[] destKey,
                        RedisZSetCommands.Aggregate aggregate,
                        int[] weights,
                        byte[]... sets)
Description copied from interface: RedisZSetCommands
Intersect sorted sets and store result in destination key.

Specified by:
zInterStore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zinterstore

zInterStore

public Long zInterStore(byte[] destKey,
                        byte[]... sets)
Description copied from interface: RedisZSetCommands
Intersect sorted sets and store result in destination key.

Specified by:
zInterStore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zinterstore

zRange

public Set<byte[]> zRange(byte[] key,
                          long start,
                          long end)
Description copied from interface: RedisZSetCommands
Get elements between begin and end from sorted set.

Specified by:
zRange in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrange

zRangeByScore

public Set<byte[]> zRangeByScore(byte[] key,
                                 double min,
                                 double max,
                                 long offset,
                                 long count)
Description copied from interface: RedisZSetCommands
Get elements in range from begin to end where score is between min and max from sorted set.

Specified by:
zRangeByScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrangebyscore

zRangeByScore

public Set<byte[]> zRangeByScore(byte[] key,
                                 double min,
                                 double max)
Description copied from interface: RedisZSetCommands
Get elements where score is between min and max from sorted set.

Specified by:
zRangeByScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrangebyscore

zRangeByScoreWithScores

public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key,
                                                            double min,
                                                            double max,
                                                            long offset,
                                                            long count)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuples in range from begin to end where score is between min and max from sorted set.

Specified by:
zRangeByScoreWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrangebyscore

zRangeByScoreWithScores

public Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key,
                                                            double min,
                                                            double max)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuples where score is between min and max from sorted set.

Specified by:
zRangeByScoreWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrangebyscore

zRangeWithScores

public Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key,
                                                     long start,
                                                     long end)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuples between begin and end from sorted set.

Specified by:
zRangeWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrange

zRevRangeByScore

public Set<byte[]> zRevRangeByScore(byte[] key,
                                    double min,
                                    double max,
                                    long offset,
                                    long count)
Description copied from interface: RedisZSetCommands
Get elements in range from begin to end where score is between min and max from sorted set ordered high -> low.

Specified by:
zRevRangeByScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrangebyscore

zRevRangeByScore

public Set<byte[]> zRevRangeByScore(byte[] key,
                                    double min,
                                    double max)
Description copied from interface: RedisZSetCommands
Get elements where score is between min and max from sorted set ordered high -> low.

Specified by:
zRevRangeByScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrange

zRevRangeByScoreWithScores

public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key,
                                                               double min,
                                                               double max,
                                                               long offset,
                                                               long count)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuple in range from begin to end where score is between min and max from sorted set ordered high -> low.

Specified by:
zRevRangeByScoreWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrangebyscore

zRevRangeByScoreWithScores

public Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key,
                                                               double min,
                                                               double max)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuple where score is between min and max from sorted set ordered high -> low.

Specified by:
zRevRangeByScoreWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrange

zRank

public Long zRank(byte[] key,
                  byte[] value)
Description copied from interface: RedisZSetCommands
Determine the index of element with value in a sorted set.

Specified by:
zRank in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrank

zRem

public Long zRem(byte[] key,
                 byte[]... values)
Description copied from interface: RedisZSetCommands
Remove values from sorted set. Return number of removed elements.

Specified by:
zRem in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrem

zRemRange

public Long zRemRange(byte[] key,
                      long start,
                      long end)
Description copied from interface: RedisZSetCommands
Remove elements in range between begin and end from sorted set with key.

Specified by:
zRemRange in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zremrange

zRemRangeByScore

public Long zRemRangeByScore(byte[] key,
                             double min,
                             double max)
Description copied from interface: RedisZSetCommands
Remove elements with scores between min and max from sorted set with key.

Specified by:
zRemRangeByScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zremrangebyscore

zRevRange

public Set<byte[]> zRevRange(byte[] key,
                             long start,
                             long end)
Description copied from interface: RedisZSetCommands
Get elements in range from begin to end from sorted set ordered high -> low.

Specified by:
zRevRange in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrange

zRevRangeWithScores

public Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key,
                                                        long start,
                                                        long end)
Description copied from interface: RedisZSetCommands
Get set of RedisZSetCommands.Tuples in range from begin to end from sorted set ordered high -> low.

Specified by:
zRevRangeWithScores in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrange

zRevRank

public Long zRevRank(byte[] key,
                     byte[] value)
Description copied from interface: RedisZSetCommands
Determine the index of element with value in a sorted set when scored high to low.

Specified by:
zRevRank in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrevrank

zScore

public Double zScore(byte[] key,
                     byte[] value)
Description copied from interface: RedisZSetCommands
Get the score of element with value from sorted set with key key.

Specified by:
zScore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zrem

zUnionStore

public Long zUnionStore(byte[] destKey,
                        RedisZSetCommands.Aggregate aggregate,
                        int[] weights,
                        byte[]... sets)
Description copied from interface: RedisZSetCommands
Union sorted sets and store result in destination key.

Specified by:
zUnionStore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zunionstore

zUnionStore

public Long zUnionStore(byte[] destKey,
                        byte[]... sets)
Description copied from interface: RedisZSetCommands
Union sorted sets and store result in destination key.

Specified by:
zUnionStore in interface RedisZSetCommands
Returns:
See Also:
http://redis.io/commands/zunionstore

pExpire

public Boolean pExpire(byte[] key,
                       long millis)
Description copied from interface: RedisKeyCommands
Set time to live for given key in milliseconds.

Specified by:
pExpire in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/pexpire

pExpireAt

public Boolean pExpireAt(byte[] key,
                         long unixTimeInMillis)
Description copied from interface: RedisKeyCommands
Set the expiration for given key as a UNIX timestamp in milliseconds.

Specified by:
pExpireAt in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/pexpireat

pTtl

public Long pTtl(byte[] key)
Description copied from interface: RedisKeyCommands
Get the time to live for key in milliseconds.

Specified by:
pTtl in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/pttl

dump

public byte[] dump(byte[] key)
Description copied from interface: RedisKeyCommands
Retrieve serialized version of the value stored at key.

Specified by:
dump in interface RedisKeyCommands
Returns:
See Also:
http://redis.io/commands/dump

restore

public void restore(byte[] key,
                    long ttlInMillis,
                    byte[] serializedValue)
Description copied from interface: RedisKeyCommands
Create key using the serializedValue, previously obtained using RedisKeyCommands.dump(byte[]).

Specified by:
restore in interface RedisKeyCommands
See Also:
http://redis.io/commands/restore

scriptFlush

public void scriptFlush()
Description copied from interface: RedisScriptingCommands
Flush lua script cache.

Specified by:
scriptFlush in interface RedisScriptingCommands
See Also:
http://redis.io/commands/script-flush

scriptKill

public void scriptKill()
Description copied from interface: RedisScriptingCommands
Kill current lua script execution.

Specified by:
scriptKill in interface RedisScriptingCommands
See Also:
http://redis.io/commands/script-kill

scriptLoad

public String scriptLoad(byte[] script)
Description copied from interface: RedisScriptingCommands
Load lua script into scripts cache, without executing it.
Execute the script by calling #evalSha(String, ReturnType, int, byte[]).

Specified by:
scriptLoad in interface RedisScriptingCommands
Returns:
See Also:
http://redis.io/commands/script-load

scriptExists

public List<Boolean> scriptExists(String... scriptSha1)
Description copied from interface: RedisScriptingCommands
Check if given scriptShas exist in script cache.

Specified by:
scriptExists in interface RedisScriptingCommands
Returns:
one entry per given scriptSha in returned list.
See Also:
http://redis.io/commands/script-exits

eval

public <T> T eval(byte[] script,
                  ReturnType returnType,
                  int numKeys,
                  byte[]... keysAndArgs)
Description copied from interface: RedisScriptingCommands
Evaluate given script.

Specified by:
eval in interface RedisScriptingCommands
Returns:
See Also:
http://redis.io/commands/eval

evalSha

public <T> T evalSha(String scriptSha1,
                     ReturnType returnType,
                     int numKeys,
                     byte[]... keysAndArgs)
Description copied from interface: RedisScriptingCommands
Evaluate given scriptSha.

Specified by:
evalSha in interface RedisScriptingCommands
Returns:
See Also:
http://redis.io/commands/evalsha

append

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

bLPop

public List<String> bLPop(int timeout,
                          String... keys)
Specified by:
bLPop in interface StringRedisConnection

bRPop

public List<String> bRPop(int timeout,
                          String... keys)
Specified by:
bRPop in interface StringRedisConnection

bRPopLPush

public String bRPopLPush(int timeout,
                         String srcKey,
                         String dstKey)
Specified by:
bRPopLPush in interface StringRedisConnection

decr

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

decrBy

public Long decrBy(String key,
                   long value)
Specified by:
decrBy in interface StringRedisConnection

del

public Long del(String... keys)
Specified by:
del in interface StringRedisConnection

echo

public String echo(String message)
Specified by:
echo in interface StringRedisConnection

exists

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

expire

public Boolean expire(String key,
                      long seconds)
Specified by:
expire in interface StringRedisConnection

expireAt

public Boolean expireAt(String key,
                        long unixTime)
Specified by:
expireAt in interface StringRedisConnection

get

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

getBit

public Boolean getBit(String key,
                      long offset)
Specified by:
getBit in interface StringRedisConnection

getRange

public String getRange(String key,
                       long start,
                       long end)
Specified by:
getRange in interface StringRedisConnection

getSet

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

hDel

public Long hDel(String key,
                 String... fields)
Specified by:
hDel in interface StringRedisConnection

hExists

public Boolean hExists(String key,
                       String field)
Specified by:
hExists in interface StringRedisConnection

hGet

public String hGet(String key,
                   String field)
Specified by:
hGet in interface StringRedisConnection

hGetAll

public Map<String,String> hGetAll(String key)
Specified by:
hGetAll in interface StringRedisConnection

hIncrBy

public Long hIncrBy(String key,
                    String field,
                    long delta)
Specified by:
hIncrBy in interface StringRedisConnection

hIncrBy

public Double hIncrBy(String key,
                      String field,
                      double delta)
Specified by:
hIncrBy in interface StringRedisConnection

hKeys

public Set<String> hKeys(String key)
Specified by:
hKeys in interface StringRedisConnection

hLen

public Long hLen(String key)
Specified by:
hLen in interface StringRedisConnection

hMGet

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

hMSet

public void hMSet(String key,
                  Map<String,String> hashes)
Specified by:
hMSet in interface StringRedisConnection

hSet

public Boolean hSet(String key,
                    String field,
                    String value)
Specified by:
hSet in interface StringRedisConnection

hSetNX

public Boolean hSetNX(String key,
                      String field,
                      String value)
Specified by:
hSetNX in interface StringRedisConnection

hVals

public List<String> hVals(String key)
Specified by:
hVals in interface StringRedisConnection

incr

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

incrBy

public Long incrBy(String key,
                   long value)
Specified by:
incrBy in interface StringRedisConnection

incrBy

public Double incrBy(String key,
                     double value)
Specified by:
incrBy in interface StringRedisConnection

keys

public Collection<String> keys(String pattern)
Specified by:
keys in interface StringRedisConnection

lIndex

public String lIndex(String key,
                     long index)
Specified by:
lIndex in interface StringRedisConnection

lInsert

public Long lInsert(String key,
                    RedisListCommands.Position where,
                    String pivot,
                    String value)
Specified by:
lInsert in interface StringRedisConnection

lLen

public Long lLen(String key)
Specified by:
lLen in interface StringRedisConnection

lPop

public String lPop(String key)
Specified by:
lPop in interface StringRedisConnection

lPush

public Long lPush(String key,
                  String... values)
Specified by:
lPush in interface StringRedisConnection

lPushX

public Long lPushX(String key,
                   String value)
Specified by:
lPushX in interface StringRedisConnection

lRange

public List<String> lRange(String key,
                           long start,
                           long end)
Specified by:
lRange in interface StringRedisConnection

lRem

public Long lRem(String key,
                 long count,
                 String value)
Specified by:
lRem in interface StringRedisConnection

lSet

public void lSet(String key,
                 long index,
                 String value)
Specified by:
lSet in interface StringRedisConnection

lTrim

public void lTrim(String key,
                  long start,
                  long end)
Specified by:
lTrim in interface StringRedisConnection

mGet

public List<String> mGet(String... keys)
Specified by:
mGet in interface StringRedisConnection

mSetNXString

public Boolean mSetNXString(Map<String,String> tuple)
Specified by:
mSetNXString in interface StringRedisConnection

mSetString

public void mSetString(Map<String,String> tuple)
Specified by:
mSetString in interface StringRedisConnection

persist

public Boolean persist(String key)
Specified by:
persist in interface StringRedisConnection

move

public Boolean move(String key,
                    int dbIndex)
Specified by:
move in interface StringRedisConnection

pSubscribe

public void pSubscribe(MessageListener listener,
                       String... patterns)
Specified by:
pSubscribe in interface StringRedisConnection

publish

public Long publish(String channel,
                    String message)
Specified by:
publish in interface StringRedisConnection

rename

public void rename(String oldName,
                   String newName)
Specified by:
rename in interface StringRedisConnection

renameNX

public Boolean renameNX(String oldName,
                        String newName)
Specified by:
renameNX in interface StringRedisConnection

rPop

public String rPop(String key)
Specified by:
rPop in interface StringRedisConnection

rPopLPush

public String rPopLPush(String srcKey,
                        String dstKey)
Specified by:
rPopLPush in interface StringRedisConnection

rPush

public Long rPush(String key,
                  String... values)
Specified by:
rPush in interface StringRedisConnection

rPushX

public Long rPushX(String key,
                   String value)
Specified by:
rPushX in interface StringRedisConnection

sAdd

public Long sAdd(String key,
                 String... values)
Specified by:
sAdd in interface StringRedisConnection

sCard

public Long sCard(String key)
Specified by:
sCard in interface StringRedisConnection

sDiff

public Set<String> sDiff(String... keys)
Specified by:
sDiff in interface StringRedisConnection

sDiffStore

public Long sDiffStore(String destKey,
                       String... keys)
Specified by:
sDiffStore in interface StringRedisConnection

set

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

setBit

public Boolean setBit(String key,
                      long offset,
                      boolean value)
Description copied from interface: StringRedisConnection
Sets the bit at offset in value stored at key.

Specified by:
setBit in interface StringRedisConnection
Returns:
the original bit value stored at offset.

setEx

public void setEx(String key,
                  long seconds,
                  String value)
Specified by:
setEx in interface StringRedisConnection

pSetEx

public void pSetEx(String key,
                   long seconds,
                   String value)
Description copied from interface: StringRedisConnection
Set the value and expiration in milliseconds for key.

Specified by:
pSetEx in interface StringRedisConnection
See Also:
http://redis.io/commands/psetex

setNX

public Boolean setNX(String key,
                     String value)
Specified by:
setNX in interface StringRedisConnection

setRange

public void setRange(String key,
                     String value,
                     long start)
Specified by:
setRange in interface StringRedisConnection

sInter

public Set<String> sInter(String... keys)
Specified by:
sInter in interface StringRedisConnection

sInterStore

public Long sInterStore(String destKey,
                        String... keys)
Specified by:
sInterStore in interface StringRedisConnection

sIsMember

public Boolean sIsMember(String key,
                         String value)
Specified by:
sIsMember in interface StringRedisConnection

sMembers

public Set<String> sMembers(String key)
Specified by:
sMembers in interface StringRedisConnection

sMove

public Boolean sMove(String srcKey,
                     String destKey,
                     String value)
Specified by:
sMove in interface StringRedisConnection

sort

public Long sort(String key,
                 SortParameters params,
                 String storeKey)
Specified by:
sort in interface StringRedisConnection

sort

public List<String> sort(String key,
                         SortParameters params)
Specified by:
sort in interface StringRedisConnection

sPop

public String sPop(String key)
Specified by:
sPop in interface StringRedisConnection

sRandMember

public String sRandMember(String key)
Specified by:
sRandMember in interface StringRedisConnection

sRandMember

public List<String> sRandMember(String key,
                                long count)
Specified by:
sRandMember in interface StringRedisConnection

sRem

public Long sRem(String key,
                 String... values)
Specified by:
sRem in interface StringRedisConnection

strLen

public Long strLen(String key)
Specified by:
strLen in interface StringRedisConnection

bitCount

public Long bitCount(String key)
Specified by:
bitCount in interface StringRedisConnection

bitCount

public Long bitCount(String key,
                     long begin,
                     long end)
Specified by:
bitCount in interface StringRedisConnection

bitOp

public Long bitOp(RedisStringCommands.BitOperation op,
                  String destination,
                  String... keys)
Specified by:
bitOp in interface StringRedisConnection

subscribe

public void subscribe(MessageListener listener,
                      String... channels)
Specified by:
subscribe in interface StringRedisConnection

sUnion

public Set<String> sUnion(String... keys)
Specified by:
sUnion in interface StringRedisConnection

sUnionStore

public Long sUnionStore(String destKey,
                        String... keys)
Specified by:
sUnionStore in interface StringRedisConnection

ttl

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

type

public DataType type(String key)
Specified by:
type in interface StringRedisConnection

zAdd

public Boolean zAdd(String key,
                    double score,
                    String value)
Specified by:
zAdd in interface StringRedisConnection

zAdd

public Long zAdd(String key,
                 Set<StringRedisConnection.StringTuple> tuples)
Specified by:
zAdd in interface StringRedisConnection

zCard

public Long zCard(String key)
Specified by:
zCard in interface StringRedisConnection

zCount

public Long zCount(String key,
                   double min,
                   double max)
Specified by:
zCount in interface StringRedisConnection

zIncrBy

public Double zIncrBy(String key,
                      double increment,
                      String value)
Specified by:
zIncrBy in interface StringRedisConnection

zInterStore

public Long zInterStore(String destKey,
                        RedisZSetCommands.Aggregate aggregate,
                        int[] weights,
                        String... sets)
Specified by:
zInterStore in interface StringRedisConnection

zInterStore

public Long zInterStore(String destKey,
                        String... sets)
Specified by:
zInterStore in interface StringRedisConnection

zRange

public Set<String> zRange(String key,
                          long start,
                          long end)
Specified by:
zRange in interface StringRedisConnection

zRangeByScore

public Set<String> zRangeByScore(String key,
                                 double min,
                                 double max,
                                 long offset,
                                 long count)
Specified by:
zRangeByScore in interface StringRedisConnection

zRangeByScore

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

zRangeByScoreWithScores

public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
                                                                      double min,
                                                                      double max,
                                                                      long offset,
                                                                      long count)
Specified by:
zRangeByScoreWithScores in interface StringRedisConnection

zRangeByScoreWithScores

public Set<StringRedisConnection.StringTuple> zRangeByScoreWithScores(String key,
                                                                      double min,
                                                                      double max)
Specified by:
zRangeByScoreWithScores in interface StringRedisConnection

zRangeWithScores

public Set<StringRedisConnection.StringTuple> zRangeWithScores(String key,
                                                               long start,
                                                               long end)
Specified by:
zRangeWithScores in interface StringRedisConnection

zRank

public Long zRank(String key,
                  String value)
Specified by:
zRank in interface StringRedisConnection

zRem

public Long zRem(String key,
                 String... values)
Specified by:
zRem in interface StringRedisConnection

zRemRange

public Long zRemRange(String key,
                      long start,
                      long end)
Specified by:
zRemRange in interface StringRedisConnection

zRemRangeByScore

public Long zRemRangeByScore(String key,
                             double min,
                             double max)
Specified by:
zRemRangeByScore in interface StringRedisConnection

zRevRange

public Set<String> zRevRange(String key,
                             long start,
                             long end)
Specified by:
zRevRange in interface StringRedisConnection

zRevRangeWithScores

public Set<StringRedisConnection.StringTuple> zRevRangeWithScores(String key,
                                                                  long start,
                                                                  long end)
Specified by:
zRevRangeWithScores in interface StringRedisConnection

zRevRangeByScore

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

zRevRangeByScoreWithScores

public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
                                                                         double min,
                                                                         double max)
Specified by:
zRevRangeByScoreWithScores in interface StringRedisConnection

zRevRangeByScore

public Set<String> zRevRangeByScore(String key,
                                    double min,
                                    double max,
                                    long offset,
                                    long count)
Specified by:
zRevRangeByScore in interface StringRedisConnection

zRevRangeByScoreWithScores

public Set<StringRedisConnection.StringTuple> zRevRangeByScoreWithScores(String key,
                                                                         double min,
                                                                         double max,
                                                                         long offset,
                                                                         long count)
Specified by:
zRevRangeByScoreWithScores in interface StringRedisConnection

zRevRank

public Long zRevRank(String key,
                     String value)
Specified by:
zRevRank in interface StringRedisConnection

zScore

public Double zScore(String key,
                     String value)
Specified by:
zScore in interface StringRedisConnection

zUnionStore

public Long zUnionStore(String destKey,
                        RedisZSetCommands.Aggregate aggregate,
                        int[] weights,
                        String... sets)
Specified by:
zUnionStore in interface StringRedisConnection

zUnionStore

public Long zUnionStore(String destKey,
                        String... sets)
Specified by:
zUnionStore in interface StringRedisConnection

closePipeline

public List<Object> closePipeline()
Description copied from interface: RedisConnection
Executes the commands in the pipeline and returns their result. If the connection is not pipelined, an empty collection is returned.

Specified by:
closePipeline in interface RedisConnection
Returns:
the result of the executed commands.

isPipelined

public boolean isPipelined()
Description copied from interface: RedisConnection
Indicates whether the connection is currently pipelined or not.

Specified by:
isPipelined in interface RedisConnection
Returns:
true if the connection is pipelined, false otherwise
See Also:
RedisConnection.openPipeline(), RedisConnection.isQueueing()

openPipeline

public void openPipeline()
Description copied from interface: RedisConnection
Activates the pipeline mode for this connection. When pipelined, all commands return null (the reply is read at the end through RedisConnection.closePipeline(). Calling this method when the connection is already pipelined has no effect. Pipelining is used for issuing commands without requesting the response right away but rather at the end of the batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve performance when issuing a lot of commands (such as in batching scenarios).

Note:

Consider doing some performance testing before using this feature since in many cases the performance benefits are minimal yet the impact on usage are not.

Specified by:
openPipeline in interface RedisConnection
See Also:
RedisTxCommands.multi()

execute

public Object execute(String command)
Specified by:
execute in interface StringRedisConnection

execute

public Object execute(String command,
                      byte[]... args)
Description copied from interface: RedisCommands
'Native' or 'raw' execution of the given command along-side the given arguments. The command is executed as is, with as little 'interpretation' as possible - it is up to the caller to take care of any processing of arguments or the result.

Specified by:
execute in interface RedisCommands
Parameters:
command - Command to execute
args - Possible command arguments (may be null)
Returns:
execution result.

execute

public Object execute(String command,
                      String... args)
Specified by:
execute in interface StringRedisConnection

pExpire

public Boolean pExpire(String key,
                       long millis)
Specified by:
pExpire in interface StringRedisConnection

pExpireAt

public Boolean pExpireAt(String key,
                         long unixTimeInMillis)
Specified by:
pExpireAt in interface StringRedisConnection

pTtl

public Long pTtl(String key)
Specified by:
pTtl in interface StringRedisConnection

scriptLoad

public String scriptLoad(String script)
Specified by:
scriptLoad in interface StringRedisConnection

eval

public <T> T eval(String script,
                  ReturnType returnType,
                  int numKeys,
                  String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. They will be returned as byte[]s

Specified by:
eval in interface StringRedisConnection

evalSha

public <T> T evalSha(String scriptSha1,
                     ReturnType returnType,
                     int numKeys,
                     String... keysAndArgs)
NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same serializer used here. They will be returned as byte[]s

Specified by:
evalSha in interface StringRedisConnection

time

public Long time()
Description copied from interface: RedisServerCommands
Request server timestamp using TIME command.

Specified by:
time in interface RedisServerCommands
Returns:
current server time in milliseconds.

getClientList

public List<RedisClientInfo> getClientList()
Description copied from interface: RedisServerCommands
Request information and statistics about connected clients.

Specified by:
getClientList in interface RedisServerCommands
Specified by:
getClientList in interface StringRedisConnection
Returns:
List of RedisClientInfo objects.
See Also:
RedisServerCommands.getClientList()

slaveOf

public void slaveOf(String host,
                    int port)
Description copied from interface: RedisServerCommands
Change redis replication setting to new master.

Specified by:
slaveOf in interface RedisServerCommands
See Also:
http://redis.io/commands/slaveof

slaveOfNoOne

public void slaveOfNoOne()
Description copied from interface: RedisServerCommands
Change server into master.

Specified by:
slaveOfNoOne in interface RedisServerCommands
See Also:
http://redis.io/commands/slaveof

setDeserializePipelineAndTxResults

public void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults)
Specifies if pipelined and tx results should be deserialized to Strings. If false, results of closePipeline() and exec() will be of the type returned by the underlying connection

Parameters:
deserializePipelineAndTxResults - Whether or not to deserialize pipeline and tx results

setClientName

public void setClientName(byte[] name)
Description copied from interface: RedisServerCommands
Assign given name to current connection.

Specified by:
setClientName in interface RedisServerCommands

setClientName

public void setClientName(String name)
Description copied from interface: StringRedisConnection
Assign given name to connection using registered RedisSerializer for name conversion.

Specified by:
setClientName in interface StringRedisConnection
See Also:
RedisServerCommands.setClientName(byte[])

killClient

public void killClient(String host,
                       int port)
Description copied from interface: RedisServerCommands
<<<<<<< HEAD Closes a given client connection identified by ip:port.

Specified by:
killClient in interface RedisServerCommands
Parameters:
host - of connection to close.
port - of connection to close

getClientName

public String getClientName()
Description copied from interface: RedisServerCommands
Returns the name of the current connection.

Specified by:
getClientName in interface RedisServerCommands
Returns:
See Also:
http://redis.io/commands/client-getname