com.twitter.finagle.redis

Client

class Client extends BaseClient with Keys with Strings with Hashes with SortedSets with Lists with Sets with BtreeSortedSetCommands

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Client
  2. BtreeSortedSetCommands
  3. Sets
  4. Lists
  5. SortedSets
  6. Hashes
  7. Strings
  8. Keys
  9. BaseClient
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Client(service: Service[Command, Reply])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def append(key: ChannelBuffer, value: ChannelBuffer): Future[Long]

    Appends value at the given key.

    Appends value at the given key. If key doesn't exist, behavior is similar to SET command

    key
    value
    returns

    length of string after append operation

    Definition Classes
    Strings
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def auth(password: ChannelBuffer): Future[Unit]

    Authorizes to db

    Authorizes to db

    password

    Definition Classes
    BaseClient
  9. def bAdd(key: ChannelBuffer, field: ChannelBuffer, value: ChannelBuffer): Future[Long]

    Sets field value pair in the given btree sorted set key

    Sets field value pair in the given btree sorted set key

    returns

    1 if field is new, 0 if field was updated

    Definition Classes
    BtreeSortedSetCommands
  10. def bCard(key: ChannelBuffer): Future[Long]

    Returns the btree sorted set cardinality for the given key

    Returns the btree sorted set cardinality for the given key

    key
    returns

    Integer representing cardinality of btree sorted set, or 0 if key does not exist

    Definition Classes
    BtreeSortedSetCommands
  11. def bGet(key: ChannelBuffer, field: ChannelBuffer): Future[Option[ChannelBuffer]]

    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

    returns

    Value if field exists

    Definition Classes
    BtreeSortedSetCommands
  12. def bRange(key: ChannelBuffer, startField: Option[ChannelBuffer], endField: Option[ChannelBuffer]): Future[Seq[(ChannelBuffer, ChannelBuffer)]]

    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

    key
    returns

    Sequence of field/value pairs

    Definition Classes
    BtreeSortedSetCommands
  13. def bRem(key: ChannelBuffer, fields: Seq[ChannelBuffer]): Future[Long]

    Deletes fields from the given btree sorted set key

    Deletes fields from the given btree sorted set key

    returns

    Number of fields deleted

    Definition Classes
    BtreeSortedSetCommands
  14. def bitCount(key: ChannelBuffer, start: Option[Int] = None, end: Option[Int] = None): Future[Long]

    Count the number of set bits (population counting) in a string.

    Count the number of set bits (population counting) in a string.

    key
    start

    optional index bytes starting from.

    end

    optional index bytes of the end.

    returns

    The number of bits set to 1.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/bitcount

  15. def bitOp(op: ChannelBuffer, dstKey: ChannelBuffer, srcKeys: Seq[ChannelBuffer]): Future[Long]

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    Perform a bitwise operation between multiple keys (containing string values) and store the result in the destination key.

    op

    operation type, one of AND/OR/XOR/NOT.

    dstKey

    destination key.

    srcKeys

    source keys perform the operation between.

    returns

    The size of the string stored in the destination key, that is equal to the size of the longest input string.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/bitop

  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def decr(key: ChannelBuffer): Future[Long]

    Decremts number stored at key by 1.

    Decremts number stored at key by 1.

    key
    returns

    value after decrement.

    Definition Classes
    Strings
  18. def decrBy(key: ChannelBuffer, amount: Long): Future[Long]

    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

    key
    amount
    returns

    value after decrement. Error if key contains value of the wrong type

    Definition Classes
    Strings
  19. def del(keys: Seq[ChannelBuffer]): Future[Long]

    Removes keys

    Removes keys

    keys

    list of keys to remove

    returns

    Number of keys removed

    Definition Classes
    Keys
  20. def dump(key: ChannelBuffer): Future[Option[ChannelBuffer]]

    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

    key
    returns

    bytes, or none if the key did not exist

    Definition Classes
    Keys
  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  23. def exists(key: ChannelBuffer): Future[Boolean]

    Checks if given key exists

    Checks if given key exists

    key
    returns

    true if key exists, false otherwise

    Definition Classes
    Keys
  24. def expire(key: ChannelBuffer, ttl: Long): Future[Boolean]

    Sets how long it will take the key to expire

    Sets how long it will take the key to expire

    key
    ttl
    returns

    boolean, true if it successfully set the ttl (time to live) on a valid key, false otherwise.

    Definition Classes
    Keys
  25. def expireAt(key: ChannelBuffer, ttl: Long): Future[Boolean]

    Same effect and semantic as "expire", but takes an absolute Unix timestamp

    Same effect and semantic as "expire", but takes an absolute Unix timestamp

    key
    ttl

    time-to-live as unix timestamp

    returns

    boolean, true if it successfully set the ttl (time to live) on a valid key, false otherwise.

    Definition Classes
    Keys
  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def flushDB(): Future[Unit]

    Deletes all keys in current DB

    Deletes all keys in current DB

    Definition Classes
    BaseClient
  28. def get(key: ChannelBuffer): Future[Option[ChannelBuffer]]

    Gets the value associated with the given key

    Gets the value associated with the given key

    key
    returns

    value, or none if key doesn't exist

    Definition Classes
    Strings
  29. def getBit(key: ChannelBuffer, offset: Int): Future[Long]

    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.

    returns

    the bit value stored at offset.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/getbit

  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def getRange(key: ChannelBuffer, start: Long, end: Long): Future[Option[ChannelBuffer]]

    Gets the substring of the value associated with given key

    Gets the substring of the value associated with given key

    key
    start
    end
    returns

    substring, or none if key doesn't exist

    Definition Classes
    Strings
  32. def getSet(key: ChannelBuffer, value: ChannelBuffer): Future[Option[ChannelBuffer]]

    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.

    returns

    the old value stored at key wrapped in Some, or None when key did not exist.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/getset

  33. def hDel(key: ChannelBuffer, fields: Seq[ChannelBuffer]): Future[Long]

    Deletes fields from given hash

    Deletes fields from given hash

    returns

    Number of fields deleted

    Definition Classes
    Hashes
  34. def hExists(key: ChannelBuffer, field: ChannelBuffer): Future[Boolean]

    Determine if a hash field exists

    Determine if a hash field exists

    returns

    true if key field exists, false otherwise

    Definition Classes
    Hashes
  35. def hGet(key: ChannelBuffer, field: ChannelBuffer): Future[Option[ChannelBuffer]]

    Gets field from hash

    Gets field from hash

    returns

    Value if field exists

    Definition Classes
    Hashes
  36. def hGetAll(key: ChannelBuffer): Future[Seq[(ChannelBuffer, ChannelBuffer)]]

    Gets all field value pairs for given hash

    Gets all field value pairs for given hash

    returns

    Sequence of field/value pairs

    Definition Classes
    Hashes
  37. def hIncrBy(key: ChannelBuffer, field: ChannelBuffer, amount: Long): Future[Long]

    Increment a field by a value

    Increment a field by a value

    returns

    new value of field

    Definition Classes
    Hashes
  38. def hKeys(key: ChannelBuffer): Future[Seq[ChannelBuffer]]

    Return all field names stored at key

    Return all field names stored at key

    returns

    List of fields in hash

    Definition Classes
    Hashes
  39. def hMGet(key: ChannelBuffer, fields: Seq[ChannelBuffer]): Future[Seq[ChannelBuffer]]

    Gets values for given fields in hash

    Gets values for given fields in hash

    returns

    List of values

    Definition Classes
    Hashes
  40. def hMSet(key: ChannelBuffer, fv: Map[ChannelBuffer, ChannelBuffer]): Future[Unit]

    Sets values for given fields in hash

    Sets values for given fields in hash

    key

    hash key

    fv

    map of field to value

    Definition Classes
    Hashes
    See also

    http://redis.io/commands/hmset

  41. def hScan(key: ChannelBuffer, cursor: Long, count: Option[Long], pattern: Option[ChannelBuffer]): Future[Seq[ChannelBuffer]]

    Returns keys in given hash, starting at cursor

    Returns keys in given hash, starting at cursor

    returns

    cursor followed by matching keys

    Definition Classes
    Hashes
  42. def hSet(key: ChannelBuffer, field: ChannelBuffer, value: ChannelBuffer): Future[Long]

    Sets field value pair in given hash

    Sets field value pair in given hash

    returns

    1 if field is new, 0 if field was updated

    Definition Classes
    Hashes
  43. def hSetNx(key: ChannelBuffer, field: ChannelBuffer, value: ChannelBuffer): Future[Long]

    Sets field value pair in given hash only if the field does not yet exist

    Sets field value pair in given hash only if the field does not yet exist

    returns

    1 if field is new, 0 if no operation was performed

    Definition Classes
    Hashes
  44. def hVals(key: ChannelBuffer): Future[Seq[ChannelBuffer]]

    Gets the values of all fields in given hash

    Gets the values of all fields in given hash

    returns

    list of values, or empty list when key does not exist

    Definition Classes
    Hashes
  45. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  46. def incr(key: ChannelBuffer): Future[Long]

    Increments the number stored at key by one.

    Increments the number stored at key by one.

    key
    returns

    the value of key after the increment.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/incr

  47. def incrBy(key: ChannelBuffer, increment: Long): Future[Long]

    Increments the number stored at key by increment.

    Increments the number stored at key by increment.

    returns

    the value of key after the increment.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/incrby

  48. def info(section: ChannelBuffer = ChannelBuffers.EMPTY_BUFFER): Future[Option[ChannelBuffer]]

    Returns information and statistics about the server

    Returns information and statistics about the server

    section

    Optional parameter can be used to select a specific section of information

    returns

    ChannelBuffer with collection of \r\n terminated lines if server has info on section

    Definition Classes
    BaseClient
  49. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  50. def keys(pattern: ChannelBuffer): Future[Seq[ChannelBuffer]]

    Returns all keys matching pattern

    Returns all keys matching pattern

    pattern
    returns

    list of keys matching pattern

    Definition Classes
    Keys
  51. def lIndex(key: ChannelBuffer, index: Long): Future[Option[ChannelBuffer]]

    Gets the value of the element at the indexth position in the list.

    Gets the value of the element at the indexth position in the list. If the key is a non-list element, an exception will be thrown.

    key
    index
    returns

    an option of the value of the element at the indexth position in the list. Nothing if the index is out of range.

    Definition Classes
    Lists
  52. def lInsertAfter(key: ChannelBuffer, pivot: ChannelBuffer, value: ChannelBuffer): Future[Option[Long]]

    Inserts a value after another pivot value in the list.

    Inserts a value after another pivot value in the list. If the key is a non-list element, an exception will be thrown.

    key
    pivot
    value
    returns

    an option of the new length of the list, or nothing if the pivot is not found, or the list is empty.

    Definition Classes
    Lists
  53. def lInsertBefore(key: ChannelBuffer, pivot: ChannelBuffer, value: ChannelBuffer): Future[Option[Long]]

    Inserts a value before another pivot value in the list.

    Inserts a value before another pivot value in the list. If the key is a non-list element, an exception will be thrown.

    key
    pivot
    value
    returns

    an option of the new length of the list, or nothing if the pivot is not found, or the list is empty.

    Definition Classes
    Lists
  54. def lLen(key: ChannelBuffer): Future[Long]

    Gets the length of the list.

    Gets the length of the list. If the key is a non-list element, an exception will be thrown.

    key
    returns

    the length of the list. Unassigned keys are considered empty lists, and return 0.

    Definition Classes
    Lists
  55. def lPop(key: ChannelBuffer): Future[Option[ChannelBuffer]]

    Pops a value off the front of the list.

    Pops a value off the front of the list. If the key is a non-list element, an exception will be thrown.

    key
    returns

    an option of the value of the popped element, or nothing if the list is empty.

    Definition Classes
    Lists
  56. def lPush(key: ChannelBuffer, value: List[ChannelBuffer]): Future[Long]

    Pushes a value onto the front of the list.

    Pushes a value onto the front of the list. If the key is a non-list element, an exception will be thrown.

    key
    value
    returns

    the length of the list

    Definition Classes
    Lists
  57. def lRange(key: ChannelBuffer, start: Long, end: Long): Future[List[ChannelBuffer]]

    Gets the values in the range supplied.

    Gets the values in the range supplied. If the key is a non-list element, an exception will be thrown.

    key
    start

    (inclusive)

    end

    (inclusive)

    returns

    a list of the value

    Definition Classes
    Lists
  58. def lRem(key: ChannelBuffer, count: Long, value: ChannelBuffer): Future[Long]

    Removes count elements matching value from the list.

    Removes count elements matching value from the list. If the key is a non-list element, an exception will be thrown.

    key
    count
    returns

    the number of removed elements.

    Definition Classes
    Lists
    Note

    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, value

  59. def lSet(key: ChannelBuffer, index: Long, value: ChannelBuffer): Future[Unit]

    Sets the indexth element to be value.

    Sets the indexth element to be value. If the key is a non-list element, an exception will be thrown.

    key
    index
    value

    Definition Classes
    Lists
  60. def lTrim(key: ChannelBuffer, start: Long, end: Long): Future[Unit]

    Removes all of the elements from the list except for those in the range.

    Removes all of the elements from the list except for those in the range.

    key
    start

    (inclusive)

    end

    (exclusive)

    Definition Classes
    Lists
  61. def mGet(keys: Seq[ChannelBuffer]): Future[Seq[Option[ChannelBuffer]]]

    Returns the values of all specified keys.

    Returns the values of all specified keys.

    keys
    returns

    list of values at the specified keys.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/mget

  62. def mSet(kv: Map[ChannelBuffer, ChannelBuffer]): Future[Unit]

    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.

    kv
    Definition Classes
    Strings
    See also

    http://redis.io/commands/mset

  63. def mSetNx(kv: Map[ChannelBuffer, ChannelBuffer]): Future[Boolean]

    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.

    kv
    returns

    1 if all keys were set, 0 if no keys were set.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/msetnx

  64. def move(key: ChannelBuffer, db: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if key was moved. false if key was not moved for any reason.

    Definition Classes
    Keys
  65. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  66. final def notify(): Unit

    Definition Classes
    AnyRef
  67. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  68. def pExpire(key: ChannelBuffer, milliseconds: Long): Future[Boolean]

    Set a key's time to live in milliseconds.

    Set a key's time to live in milliseconds.

    returns

    true if the timeout was set. false if key does not exist or the timeout could not be set.

    Definition Classes
    Keys
    See also

    http://redis.io/commands/pexpire

  69. def pExpireAt(key: ChannelBuffer, timestamp: Long): Future[Boolean]

    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.

    returns

    true if the timeout was set. false if key does not exist or the timeout could not be set (see: EXPIRE).

    Definition Classes
    Keys
    See also

    http://redis.io/commands/pexpireat

  70. def pSetEx(key: ChannelBuffer, millis: Long, value: ChannelBuffer): Future[Unit]

    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.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/psetex

  71. def pTtl(key: ChannelBuffer): Future[Option[Long]]

    Get the time to live for a key in milliseconds.

    Get the time to live for a key in milliseconds.

    key
    returns

    Time to live in milliseconds or None when key does not exist or does not have a timeout.

    Definition Classes
    Keys
    See also

  72. def quit(): Future[Unit]

    Closes connection to Redis instance

    Closes connection to Redis instance

    Definition Classes
    BaseClient
  73. def rPop(key: ChannelBuffer): Future[Option[ChannelBuffer]]

    Pops a value off the end of the list.

    Pops a value off the end of the list. If the key is a non-list element, an exception will be thrown.

    key
    returns

    an option of the value of the popped element, or nothing if the list is empty.

    Definition Classes
    Lists
  74. def rPush(key: ChannelBuffer, value: List[ChannelBuffer]): Future[Long]

    Pushes a value onto the end of the list.

    Pushes a value onto the end of the list. If the key is a non-list element, an exception will be thrown.

    key
    value
    returns

    the length of the list

    Definition Classes
    Lists
  75. def release(): Future[Unit]

    Releases underlying service object

    Releases underlying service object

    Definition Classes
    BaseClient
  76. def sAdd(key: ChannelBuffer, members: List[ChannelBuffer]): Future[Long]

    Adds elements to the set, according to the set property.

    Adds elements to the set, according to the set property. Throws an exception if the key does not refer to a set.

    key
    members
    returns

    the number of new members added to the set.

    Definition Classes
    Sets
  77. def sCard(key: ChannelBuffer): Future[Long]

    How many elements are in the set? Throws an exception if the key does not refer to a set.

    How many elements are in the set? Throws an exception if the key does not refer to a set.

    key
    returns

    the number of elements in the set. Unassigned keys are considered empty sets.

    Definition Classes
    Sets
  78. def sInter(keys: Seq[ChannelBuffer]): Future[Set[ChannelBuffer]]

    Returns the members of the set resulting from the intersection of all the given sets.

    Returns the members of the set resulting from the intersection of all the given sets.

    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.

    keys

    list of keys to intersect

    returns

    set of members from the resulting intersection

    Definition Classes
    Sets
  79. def sIsMember(key: ChannelBuffer, member: ChannelBuffer): Future[Boolean]

    Is the member in the set? Throws an exception if the key does not refer to a set.

    Is the member in the set? Throws an exception if the key does not refer to a set.

    key
    returns

    a boolean, true if it is in the set, false otherwise. Unassigned keys are considered empty sets.

    Definition Classes
    Sets
  80. def sMembers(key: ChannelBuffer): Future[Set[ChannelBuffer]]

    Gets the members of the set.

    Gets the members of the set. Throws an exception if the key does not refer to a set.

    key
    returns

    a list of the members

    Definition Classes
    Sets
  81. def sPop(key: ChannelBuffer): Future[Option[ChannelBuffer]]

    Removes an element randomly from the set, and returns it.

    Removes an element randomly from the set, and returns it. Throws an exception if the key does not refer to a set.

    key
    returns

    the member, or nothing if the set is empty.

    Definition Classes
    Sets
  82. def sRandMember(key: ChannelBuffer, count: Option[Int] = None): Future[Seq[ChannelBuffer]]

    Returns a list of random entries from the set.

    Returns a list of random entries from the set. If the count is positive, a set is returned, otherwise a list that may contain duplicates is returned.

    returns

    a sequence with count random entries from the set

    Definition Classes
    Sets
  83. def sRem(key: ChannelBuffer, members: List[ChannelBuffer]): Future[Long]

    Removes the element from the set if it is in the set.

    Removes the element from the set if it is in the set. Throws an exception if the key does not refer to a set.

    key
    returns

    an integer, the number of elements removed from the set, can be 0 if the key is unassigned.

    Definition Classes
    Sets
  84. def scan(cursor: Long, count: Option[Long], pattern: Option[ChannelBuffer]): Future[Seq[ChannelBuffer]]

    Returns keys starting at cursor

    Returns keys starting at cursor

    returns

    cursor followed by matching keys

    Definition Classes
    Keys
  85. def select(index: Int): Future[Unit]

    Select DB with specified zero-based index

    Select DB with specified zero-based index

    index

    Definition Classes
    BaseClient
  86. def set(key: ChannelBuffer, value: ChannelBuffer): Future[Unit]

    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

    key
    value

    Definition Classes
    Strings
  87. def setBit(key: ChannelBuffer, offset: Int, value: Int): Future[Long]

    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.

    returns

    the original bit value stored at offset.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/setbit

  88. def setEx(key: ChannelBuffer, seconds: Long, value: ChannelBuffer): Future[Unit]

    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.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/setex

  89. def setExNx(key: ChannelBuffer, seconds: Long, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if the key was set, false if condition was not met.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  90. def setExXx(key: ChannelBuffer, seconds: Long, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if the key was set, false if condition was not met.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  91. def setNx(key: ChannelBuffer, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    1 if the key was set, 0 if the key was not set.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/setnx

  92. def setPx(key: ChannelBuffer, millis: Long, value: ChannelBuffer): Future[Unit]

    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.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  93. def setPxNx(key: ChannelBuffer, millis: Long, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if the key was set, false if condition was not met.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  94. def setPxXx(key: ChannelBuffer, millis: Long, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if the key was set, false if condition was not met.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  95. def setRange(key: ChannelBuffer, offset: Int, value: ChannelBuffer): Future[Long]

    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.

    returns

    the length of the string after it was modified.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/setrange

  96. def setXx(key: ChannelBuffer, value: ChannelBuffer): Future[Boolean]

    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.

    returns

    true if the key was set, false if condition was not met.

    Definition Classes
    Strings
    See also

    http://redis.io.commands/set

  97. def strlen(key: ChannelBuffer): Future[Long]

    returns the length of the string value stored at key.

    returns the length of the string value stored at key.

    key
    returns

    the length of the string at key, or 0 when key does not exist.

    Definition Classes
    Strings
    See also

    http://redis.io/commands/strlen

  98. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  99. def toString(): String

    Definition Classes
    AnyRef → Any
  100. def ttl(key: ChannelBuffer): Future[Option[Long]]

    Gets the ttl of the given key.

    Gets the ttl of the given key.

    key
    returns

    Option containing either the ttl in seconds if the key exists and has a timeout, or else nothing.

    Definition Classes
    Keys
  101. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  103. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  104. def zAdd(key: ChannelBuffer, score: Double, member: ChannelBuffer): Future[Long]

    Add a member with score to a sorted set

    Add a member with score to a sorted set

    key
    score
    member
    returns

    Number of elements added to sorted set

    Definition Classes
    SortedSets
  105. def zAddMulti(key: ChannelBuffer, members: Seq[(Double, ChannelBuffer)]): Future[Long]

    Adds member, score pairs to sorted set

    Adds member, score pairs to sorted set

    key
    members

    sequence of (score, member) tuples

    returns

    Number of elements added to sorted set

    Definition Classes
    SortedSets
    Note

    Adding multiple elements only works with redis 2.4 or later.

  106. def zCard(key: ChannelBuffer): Future[Long]

    Returns sorted set cardinality of the sorted set at key

    Returns sorted set cardinality of the sorted set at key

    key
    returns

    Integer representing cardinality of sorted set, or 0 if key does not exist

    Definition Classes
    SortedSets
  107. def zCount(key: ChannelBuffer, min: ZInterval, max: ZInterval): Future[Long]

    Gets number of elements in sorted set with score between min and max

    Gets number of elements in sorted set with score between min and max

    key
    min
    max
    returns

    Number of elements between min and max in sorted set

    Definition Classes
    SortedSets
  108. def zIncrBy(key: ChannelBuffer, amount: Double, member: ChannelBuffer): Future[Option[Double]]

    Increment the member in sorted set key by amount.

    Increment the member in sorted set key by amount. Returns an option, None if the member is not found, or the set is empty, or the new value. Throws an exception if the key refers to a structure that is not a sorted set.

    key
    amount
    member
    returns

    the new value of the incremented member

    Definition Classes
    SortedSets
  109. def zRange(key: ChannelBuffer, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[ChannelBuffer]]]

    Returns specified range of elements in sorted set at key.

    Returns specified range of elements in sorted set at key. Elements are ordered from lowest to highest score.

    returns

    ZRangeResults object containing item/score pairs

    Definition Classes
    SortedSets
  110. def zRangeByScore(key: ChannelBuffer, min: ZInterval, max: ZInterval, withScores: Boolean, limit: Option[Limit]): Future[Either[ZRangeResults, Seq[ChannelBuffer]]]

    Gets member, score pairs from sorted set between min and max Results are limited by offset and count

    Gets member, score pairs from sorted set between min and max Results are limited by offset and count

    returns

    ZRangeResults object containing item/score pairs

    Definition Classes
    SortedSets
  111. def zRank(key: ChannelBuffer, member: ChannelBuffer): Future[Option[Long]]

    Gets the rank of the member in the sorted set, or None if it doesn't exist, from low to high.

    Gets the rank of the member in the sorted set, or None if it doesn't exist, from low to high.

    key
    member
    returns

    the rank of the member

    Definition Classes
    SortedSets
  112. def zRem(key: ChannelBuffer, members: Seq[ChannelBuffer]): Future[Long]

    Removes specified member(s) from sorted set at key

    Removes specified member(s) from sorted set at key

    key
    members
    returns

    Number of members removed from sorted set

    Definition Classes
    SortedSets
  113. def zRemRangeByRank(key: ChannelBuffer, start: Long, stop: Long): Future[Long]

    Removes members from sorted set by sort order, from start to stop, inclusive.

    Removes members from sorted set by sort order, from start to stop, inclusive.

    key
    start
    stop
    returns

    Number of members removed from sorted set.

    Definition Classes
    SortedSets
  114. def zRemRangeByScore(key: ChannelBuffer, min: ZInterval, max: ZInterval): Future[Long]

    Removes members from sorted set by score, from min to max, inclusive.

    Removes members from sorted set by score, from min to max, inclusive.

    key
    min
    max
    returns

    Number of members removed from sorted set.

    Definition Classes
    SortedSets
  115. def zRevRange(key: ChannelBuffer, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[ChannelBuffer]]]

    Returns specified range of elements in sorted set at key Elements are ordered from highest to lowest score

    Returns specified range of elements in sorted set at key Elements are ordered from highest to lowest score

    returns

    List of elements in specified range

    Definition Classes
    SortedSets
  116. def zRevRangeByScore(key: ChannelBuffer, max: ZInterval, min: ZInterval, withScores: Boolean, limit: Option[Limit]): Future[Either[ZRangeResults, Seq[ChannelBuffer]]]

    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 offset and count

    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 offset and count

    returns

    ZRangeResults object containing item/score pairs

    Definition Classes
    SortedSets
  117. def zRevRank(key: ChannelBuffer, member: ChannelBuffer): Future[Option[Long]]

    Gets the rank of member in the sorted set, or None if it doesn't exist, from high to low.

    Gets the rank of member in the sorted set, or None if it doesn't exist, from high to low.

    key
    member
    returns

    the rank of the member

    Definition Classes
    SortedSets
  118. def zScore(key: ChannelBuffer, member: ChannelBuffer): Future[Option[Double]]

    Gets score of member in sorted set

    Gets score of member in sorted set

    returns

    Score of member

    Definition Classes
    SortedSets

Inherited from BtreeSortedSetCommands

Inherited from Sets

Inherited from Lists

Inherited from SortedSets

Inherited from Hashes

Inherited from Strings

Inherited from Keys

Inherited from BaseClient

Inherited from AnyRef

Inherited from Any

Ungrouped