Appends value at the given key.
Appends value at the given key. If key doesn't exist, behavior is similar to SET command
length of string after append operation
Authorizes to db
Authorizes to db
Sets field
: value
pair in the given btree sorted set key
.
Sets field
: value
pair in the given btree sorted set key
.
1 if field is new, 0 if field was updated.
Returns the btree sorted set cardinality for the given key
.
Returns the btree sorted set cardinality for the given key
.
Returns 0 if key does not exist.
Gets the value for the field
from the given btree sorted set key
.
Gets the value for the field
from the given btree sorted set key
.
Some
if the field exists, None
otherwise.
Gets all field value pairs for the given btree sorted order key
from startField
to endField
.
Gets all field value pairs for the given btree sorted order key
from startField
to endField
.
Deletes fields
from the given btree sorted set key
.
Deletes fields
from the given btree sorted set key
.
The number of fields deleted.
Releases underlying service factory object
Releases underlying service factory object
Decrements number stored at key by 1.
Decrements number stored at key by 1.
value after decrement.
Decrements number stored at key by given amount.
Decrements number stored at key by given amount. If key doesn't exist, value is set to 0 before the operation
value after decrement. Error if key contains value of the wrong type
Removes keys
Removes keys
list of keys to remove
Number of keys removed
Serialize the value stored at key in a Redis-specific format and returns it to the user
Serialize the value stored at key in a Redis-specific format and returns it to the user
bytes, or none if the key did not exist
Executes EVAL command returns the raw redis-server Reply.
Executes EVAL command returns the raw redis-server Reply.
User may convert this Reply to type T by calling their Scripts.castReply[T](reply), or "reply.cast[T]" which is an implicit conversion through Scripts.CastableReply helper class.
An idiomatic usage:
import Scripts._ client.eval(script, keys, argv).map { _.cast[Long] }
returns a Future[Long], and is equivalent to
client.eval(script, keys, argv).map(Scripts.castReply[Long])
the script to execute
the redis keys that the script may have access to
the array of arguments that the script takes
redis-server Reply
Executes EVALSHA command, and if redis-server complains about NOSCRIPT, execute EVAL with fallback "script" instead.
Executes EVALSHA command, and if redis-server complains about NOSCRIPT, execute EVAL with fallback "script" instead.
Similar to evalSha, but this takes a fallback "script" parameter in addition to "sha", so that any ErrorReply("NOSCRIPT...") will be silently caught and a corresponding EVAL command will be retried.
SHA-1 digest of the script to execute
the fallback script. User must guarantee that
sha == SHA1(script)
where "SHA1" computes the SHA-1 digest (as a HEX string) of script.
the redis keys that the script may have access to
the array of arguments that the script takes
redis-server Reply
Executes EVALSHA command and returns the raw redis-server Reply.
Executes EVALSHA command and returns the raw redis-server Reply.
Similar to eval, but takes "sha" (SHA-1 digest of a script) as the first parameter. If the script cache on redis-server does not contain a script whose SHA-1 digest is "sha", this will return ErrorReply(message) where message starts with "NOSCRIPT".
SHA-1 digest of the script to execute
the redis keys that the script may have access to
the array of arguments that the script takes
redis-server Reply
Checks if given key exists
Checks if given key exists
true if key exists, false otherwise
Sets how long it will take the key to expire
Sets how long it will take the key to expire
boolean, true if it successfully set the ttl (time to live) on a valid key, false otherwise.
Same effect and semantic as "expire", but takes an absolute Unix timestamp
Same effect and semantic as "expire", but takes an absolute Unix timestamp
time-to-live as unix timestamp
boolean, true if it successfully set the ttl (time to live) on a valid key, false otherwise.
Deletes all keys in all databases
Deletes all keys in all databases
Deletes all keys in current DB
Deletes all keys in current DB
Gets the value associated with the given key
Gets the value associated with the given key
value, or none if key doesn't exist
Returns the bit value at offset in the string value stored at key.
Returns the bit value at offset in the string value stored at key.
the bit value stored at offset.
http://redis.io/commands/getbit
Gets the substring of the value associated with given key
Gets the substring of the value associated with given key
substring, or none if key doesn't exist
Atomically sets key to value and returns the old value stored at key.
Atomically sets key to value and returns the old value stored at key. Returns an error when key exists but does not hold a string value.
the old value stored at key wrapped in Some, or None when key did not exist.
http://redis.io/commands/getset
Deletes fields
from given hash key
.
Deletes fields
from given hash key
. Returns the number of fields deleted.
Determines if a hash field
exists on a given hash key
.
Determines if a hash field
exists on a given hash key
. Returns boolean
signaling whether the field exists.
Gets field
from a given hash key
.
Gets field
from a given hash key
.
Gets all field value pairs for given hash key
.
Gets all field value pairs for given hash key
.
Increments a field
on a given hash key
by amount
.
Increments a field
on a given hash key
by amount
. Returns new field value.
Returns all field names stored at the hash key
.
Returns all field names stored at the hash key
.
Returns the number of fields stored at the hash key
.
Returns the number of fields stored at the hash key
.
Gets values for given fields stored at the hash key
.
Gets values for given fields stored at the hash key
.
Sets values for given fields stored at the hash key
.
Sets values for given fields stored at the hash key
.
Sets values for given fields stored at the hash key
and sets the ttl.
Sets values for given fields stored at the hash key
and sets the ttl.
Adds values for given fields stored at the hash key
if it doesn't exist
and sets the ttl.
Adds values for given fields stored at the hash key
if it doesn't exist
and sets the ttl. Version set at the destination is retained if it already exists.
Returns keys in given hash key
, starting at cursor
.
Returns keys in given hash key
, starting at cursor
.
Sets field
stored at given hash key
to a given value
.
Sets field
stored at given hash key
to a given value
.
Returns 1
if fields is new, 0
if field was updated.
Sets field
stored at given hash key
to a given value
only if the field
Returns 1
if fields is new, 0
no operation was performed.
Sets field
stored at given hash key
to a given value
only if the field
Returns 1
if fields is new, 0
no operation was performed.
Gets the values of all fields in given hash key
.
Gets the values of all fields in given hash key
. Returns empty
list if key does not exist.
Increments the number stored at key by one.
Increments the number stored at key by one.
the value of key after the increment.
http://redis.io/commands/incr
Increments the number stored at key by increment.
Increments the number stored at key by increment.
the value of key after the increment.
http://redis.io/commands/incrby
Returns information and statistics about the server
Returns information and statistics about the server
used to select a specific section of information.
a collection of \r\n terminated lines if server has info on the section
Returns information and statistics about the server
Returns information and statistics about the server
Buf with collection of \r\n terminated lines of the default info section
Returns all keys matching pattern
Returns all keys matching pattern
list of keys matching pattern
Gets the value of the element at the index
position in the list stored
at the hash key
.
Gets the value of the element at the index
position in the list stored
at the hash key
. If the key is a non-list element, an exception will be
thrown.
Some
if the given element exists, None
otherwise.
Inserts a given value
after another pivot
value in the list stored
at the hash key
.
Inserts a given value
after another pivot
value in the list stored
at the hash key
. If the key is a non-list element, an exception will
be thrown.
Some
of the new length of the list. None
if the pivot is not
found, or the list is empty.
Inserts a value
before another pivot
value in the list stored at the
hash key
.
Inserts a value
before another pivot
value in the list stored at the
hash key
. If the key is a non-list element, an exception will be thrown.
Some
of the new length of the list, or None
if the pivot is
not found, or the list is empty.
Gets the length of the list stored at the hash key
.
Gets the length of the list stored at the hash key
. If the key is a
non-list element, an exception will be thrown. Unassigned keys are
considered empty lists (has size 0).
Pops a value off the front of the list stored at the hash key
.
Pops a value off the front of the list stored at the hash key
. If the key
is a non-list element, an exception will be thrown.
Some
of the value of the popped element, or None
if the list is
empty.
Pushes a list of value
onto the front of the list stored at the hash
key
.
Pushes a list of value
onto the front of the list stored at the hash
key
. If the key is a non-list element, an exception will be thrown.
The length of the list.
Gets the values in the given range start
- end
(inclusive) of the list
stored at the hash key
.
Gets the values in the given range start
- end
(inclusive) of the list
stored at the hash key
. If the key is a non-list element, an exception will
be thrown.
Removes count
elements matching value
from the list stored
at the hash key
.
Removes count
elements matching value
from the list stored
at the hash key
. If the key is a non-list element, an exception will
be thrown.
The number of removed elements.
The sign of count
describes whether it will remove them from the
back or the front of the list. If count
is 0, it will remove all
instances.
Sets the element at index
in the list stored under the hash key
to a
given value
.
Sets the element at index
in the list stored under the hash key
to a
given value
. If the key is a non-list element, an exception will be thrown.
Removes all of the elements from the list stored at hash key
, except for
those in the range: start
- end
(inclusive).
Removes all of the elements from the list stored at hash key
, except for
those in the range: start
- end
(inclusive).
Returns the values of all specified keys.
Returns the values of all specified keys.
list of values at the specified keys.
http://redis.io/commands/mget
Sets the given keys to their respective values.
Sets the given keys to their respective values. MSET replaces existing values with new values, just as regular SET.
http://redis.io/commands/mset
Sets the given keys to their respective values.
Sets the given keys to their respective values. MSETNX will not perform any operation at all even if just a single key already exists.
1 if all keys were set, 0 if no keys were set.
http://redis.io/commands/msetnx
Move key from the currently selected database to the specified destination database.
Move key from the currently selected database to the specified destination database. When key already exists in the destination database, or it does not exist in the source database, it does nothing.
true if key was moved. false if key was not moved for any reason.
Set a key's time to live in milliseconds.
Set a key's time to live in milliseconds.
true if the timeout was set. false if key does not exist or the timeout could not be set.
http://redis.io/commands/pexpire
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
true if the timeout was set. false if key does not exist or the timeout could not be set (see: EXPIRE).
http://redis.io/commands/pexpireat
Works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.
Works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.
http://redis.io/commands/psetex
Get the time to live for a key in milliseconds.
Get the time to live for a key in milliseconds.
Time to live in milliseconds or None when key does not exist or does not have a timeout.
Persist a key by removing it's expiration time
Persist a key by removing it's expiration time
1 if ttl was removed, 0 if key doesn't exist or doesn't have a ttl
Adds elements
to a HyperLogLog data structure stored under hash key
.
Adds elements
to a HyperLogLog data structure stored under hash key
.
Whether a bit was set in the HyperLogLog data structure.
http://redis.io/commands/pfadd
Gets the approximated cardinality (number of unique elements) of sets
observed by the HyperLogLog at keys
.
Gets the approximated cardinality (number of unique elements) of sets
observed by the HyperLogLog at keys
.
http://redis.io/commands/pfcount
Merges HyperLogLogs at srcKeys
to create a new HyperLogLog at destKey
.
Merges HyperLogLogs at srcKeys
to create a new HyperLogLog at destKey
.
http://redis.io/commands/pfmerge
Sends a PING to Redis instance
Sends a PING to Redis instance
Lists the currently active channels.
Lists the currently active channels. An active channel is a Pub/Sub channel with one or more subscribers (not including clients subscribed to patterns).
Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command).
Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command).
Returns the number of subscribers (not counting clients subscribed
to patterns) for the specified channels
.
Returns the number of subscribers (not counting clients subscribed
to patterns) for the specified channels
.
Publishes a message
to the specified channel
.
Publishes a message
to the specified channel
.
Closes connection to Redis instance
Closes connection to Redis instance
Pops a value off the end of the list stored at hash key
.
Pops a value off the end of the list stored at hash key
. If the key is a
non-list element, an exception will be thrown.
Some
of the value of the popped element, or None
if the list is
empty.
Pushes given values
onto the end of the list stored at the hash key
.
Pushes given values
onto the end of the list stored at the hash key
.
If the key is a non-list element, an exception will be thrown.
The length of the list.
Adds members
to the set stored under the key
.
Adds members
to the set stored under the key
. Throws an exception
if the key
does not refer to a set.
The number of new members added to the set.
Returns the size of the set stored under the key
.
Returns the size of the set stored under the key
. Throws an exception
if the key does not refer to a set.
Unassigned keys are considered empty sets.
Returns the members of the set resulting from the intersection of all
the sets stored under keys
.
Returns the members of the set resulting from the intersection of all
the sets stored under keys
.
Keys that do not exist are considered to be empty sets. With one of the keys being an empty set, the resulting set is also empty (since set intersection with an empty set always results in an empty set).
Throws an exception if the keys
Seq is empty or if any of the keys
passed as params are empty.
Checks if the given member
exists in a set stored under the key
.
Checks if the given member
exists in a set stored under the key
.
Throws an exception if the key
does not refer to a set.
Unassigned keys are considered empty sets.
Gets the members of the set stored under the key
.
Gets the members of the set stored under the key
. Throws an exception
if the key
does not refer to a set.
Removes an element randomly from the set stored under the key
, and returns it.
Removes an element randomly from the set stored under the key
, and returns it.
Throws an exception if the key does not refer to a set.
Some
if the member exists, or None
if the set is empty.
Returns a list of random entries from the set stored under the key
.
Returns a list of random entries from the set stored under the key
. If the
count is positive, a set is returned, otherwise a list that may contain
duplicates is returned.
Removes members
from the set stored under the key
.
Removes members
from the set stored under the key
. Throws an exception
if the key
does not refer to a set.
The number of elements removed from the set, can be 0 if the key is unassigned.
Returns keys in given set key
, starting at cursor
.
Returns keys in given set key
, starting at cursor
.
Returns keys starting at cursor
Returns keys starting at cursor
cursor followed by matching keys
Returns whether each sha1 digest in "digests" indicates some valid script on redis-server script cache.
Returns whether each sha1 digest in "digests" indicates some valid script on redis-server script cache.
Flushes the script cache on redis-server.
Flushes the script cache on redis-server.
Loads a script to redis-server script cache, and returns its SHA-1 digest as a HEX string.
Loads a script to redis-server script cache, and returns its SHA-1 digest as a HEX string.
Note that the SHA-1 digest of "script" (as a HEX string) can also be calculated locally, and it does equal what will be returned by redis-server, but this call, once succeeds, has the side effect of loading the script to the cache on redis-server.
Select DB with specified zero-based index
Select DB with specified zero-based index
Sets the given value to key.
Sets the given value to key. If a value already exists for the key, the value is overwritten with the new value
Sets or clears the bit at offset in the string value stored at key.
Sets or clears the bit at offset in the string value stored at key.
the original bit value stored at offset.
http://redis.io/commands/setbit
Set key to hold the string value and set key to timeout after a given number of seconds.
Set key to hold the string value and set key to timeout after a given number of seconds.
http://redis.io/commands/setex
Set key to hold the string value with the specified expire time in seconds only if the key does not already exist.
Set key to hold the string value with the specified expire time in seconds only if the key does not already exist.
true if the key was set, false if condition was not met.
http://redis.io.commands/set
Set key to hold the string value with the specified expire time in seconds only if the key already exist.
Set key to hold the string value with the specified expire time in seconds only if the key already exist.
true if the key was set, false if condition was not met.
http://redis.io.commands/set
Set key to hold string value if key does not exist.
Set key to hold string value if key does not exist. In that case, it is equal to SET. When key already holds a value, no operation is performed.
1 if the key was set, 0 if the key was not set.
http://redis.io/commands/setnx
Set key to hold the string value with the specified expire time in milliseconds.
Set key to hold the string value with the specified expire time in milliseconds.
http://redis.io.commands/set
Set key to hold the string value with the specified expire time in milliseconds only if the key does not already exist.
Set key to hold the string value with the specified expire time in milliseconds only if the key does not already exist.
true if the key was set, false if condition was not met.
http://redis.io.commands/set
Set key to hold the string value with the specified expire time in milliseconds only if the key already exist.
Set key to hold the string value with the specified expire time in milliseconds only if the key already exist.
true if the key was set, false if condition was not met.
http://redis.io.commands/set
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
Overwrites part of the string stored at key, starting at the specified offset, for the entire length of value.
the length of the string after it was modified.
http://redis.io/commands/setrange
Set key to hold the string value only if the key already exist.
Set key to hold the string value only if the key already exist.
true if the key was set, false if condition was not met.
http://redis.io.commands/set
returns the length of the string value stored at key.
returns the length of the string value stored at key.
the length of the string at key, or 0 when key does not exist.
http://redis.io/commands/strlen
Adds a key
: value
pair to a topology.
Adds a key
: value
pair to a topology.
Deletes a pair with a key
from a topology.
Deletes a pair with a key
from a topology.
Gets a value stored under key
from a topology.
Gets a value stored under key
from a topology.
Gets the ttl of the given key.
Gets the ttl of the given key.
Option containing either the ttl in seconds if the key exists and has a timeout, or else nothing.
Flushes all previously watched keys for a transaction
Marks given keys to be watched for conditional execution of a transaction
Marks given keys to be watched for conditional execution of a transaction
to watch
Adds a member
with score
to a sorted set under the key
.
Adds a member
with score
to a sorted set under the key
.
The number of elements added to sorted set.
Adds member -> score pair members
to sorted set under the key
.
Adds member -> score pair members
to sorted set under the key
.
The number of elements added to sorted set.
Adding multiple elements only works with redis 2.4 or later.
Returns cardinality of the sorted set under the key
, or 0
if key
does not exist.
Returns cardinality of the sorted set under the key
, or 0
if key
does not exist.
Gets number of elements in sorted set under the key
with score
between min
and max
.
Gets number of elements in sorted set under the key
with score
between min
and max
.
Increments the member
in sorted set at the key
by a given amount
.
Increments the member
in sorted set at the key
by a given amount
.
Returns Some
of the new value of the incremented member or None
if
the member is not found or the set is empty. Throws an exception if
the key refers to a structure that is not a sorted set.
Returns specified range (from start
to stop
) of elements in
sorted set at the key
.
Returns specified range (from start
to stop
) of elements in
sorted set at the key
. Elements are ordered from lowest to
highest score.
Gets member -> score pairs from sorted set under the key
between
min
and max
.
Gets member -> score pairs from sorted set under the key
between
min
and max
. Results are limited by limit
.
Gets the rank of the member
in the sorted set at the key
, or None
if it doesn't exist.
Gets the rank of the member
in the sorted set at the key
, or None
if it doesn't exist.
Removes specified members
from sorted set at key
.
Removes specified members
from sorted set at key
.
The number of members removed.
Removes members from sorted set at the key
by sort order,
from start
to stop
, inclusive.
Removes members from sorted set at the key
by sort order,
from start
to stop
, inclusive.
The number of members removed from sorted set.
Removes members from sorted set at the key
by score, from
min
to max
, inclusive.
Removes members from sorted set at the key
by score, from
min
to max
, inclusive.
The number of members removed from sorted set.
Returns specified range (from start
to end
) of elements in
sorted set at key
.
Returns specified range (from start
to end
) of elements in
sorted set at key
. Elements are ordered from highest to lowest score.
Returns elements in sorted set at key
with a score between max
and min
.
Returns elements in sorted set at key
with a score between max
and min
.
Elements are ordered from highest to lowest score Results are limited by limit
.
Gets the rank of a member
in the sorted set at the key
, or None
if it doesn't exist.
Gets the rank of a member
in the sorted set at the key
, or None
if it doesn't exist.
Returns keys in given set key
, starting at cursor
.
Returns keys in given set key
, starting at cursor
.
Gets the score of a member
in sorted set at the key
.
Gets the score of a member
in sorted set at the key
.
Client connected over a single connection to a single redis instance, supporting transactions