Class/Object

com.twitter.finagle.redis

Client

Related Docs: object Client | package redis

Permalink

class Client extends BaseClient with NormalCommands with SubscribeCommands with Transactions

Linear Supertypes
Transactions, SubscribeCommands, NormalCommands, ConnectionCommands, BasicConnectionCommands, ScriptCommands, ServerCommands, BasicServerCommands, PubSubCommands, GeoCommands, HyperLogLogCommands, TopologyCommands, BtreeSortedSetCommands, SetCommands, ListCommands, SortedSetCommands, HashCommands, StringCommands, KeyCommands, BaseClient, Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. Transactions
  3. SubscribeCommands
  4. NormalCommands
  5. ConnectionCommands
  6. BasicConnectionCommands
  7. ScriptCommands
  8. ServerCommands
  9. BasicServerCommands
  10. PubSubCommands
  11. GeoCommands
  12. HyperLogLogCommands
  13. TopologyCommands
  14. BtreeSortedSetCommands
  15. SetCommands
  16. ListCommands
  17. SortedSetCommands
  18. HashCommands
  19. StringCommands
  20. KeyCommands
  21. BaseClient
  22. Closable
  23. AnyRef
  24. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Client(factory: ServiceFactory[Command, Reply], timer: Timer = DefaultTimer)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. val FutureFalse: Future[Boolean]

    Permalink
    Definition Classes
    StringCommands
  5. val FutureTrue: Future[Boolean]

    Permalink
    Definition Classes
    StringCommands
  6. def append(key: Buf, value: Buf): Future[Long]

    Permalink

    Appends value at the given key.

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

    returns

    length of string after append operation

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

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

    Permalink

    Authorizes to db

    Authorizes to db

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

    Permalink

    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: Buf): Future[Long]

    Permalink

    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.

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

    Permalink

    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

    Some if the field exists, None otherwise.

    Definition Classes
    BtreeSortedSetCommands
  12. def bMergeEx(key: Buf, fv: Map[Buf, Buf], milliseconds: Long): Future[Unit]

    Permalink
    Definition Classes
    BtreeSortedSetCommands
  13. def bRange(key: Buf, count: Int, startField: Option[Buf], endField: Option[Buf]): Future[Seq[(Buf, Buf)]]

    Permalink

    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.

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

    Permalink

    Deletes fields from the given btree sorted set key.

    Deletes fields from the given btree sorted set key.

    returns

    The number of fields deleted.

    Definition Classes
    BtreeSortedSetCommands
  15. def bitCount(key: Buf, start: Option[Int], end: Option[Int]): Future[Long]

    Permalink
    Definition Classes
    StringCommands
  16. def bitCount(key: Buf): Future[Long]

    Permalink
    Definition Classes
    StringCommands
  17. def bitOp(op: Buf, dstKey: Buf, srcKeys: Seq[Buf]): Future[Long]

    Permalink
    Definition Classes
    StringCommands
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def close(deadline: Time): Future[Unit]

    Permalink

    Releases underlying service factory object

    Releases underlying service factory object

    Definition Classes
    BaseClient → Closable
  20. def close(after: Duration): Future[Unit]

    Permalink
    Definition Classes
    Closable
  21. final def close(): Future[Unit]

    Permalink
    Definition Classes
    Closable
  22. def dbSize(): Future[Long]

    Permalink
    Definition Classes
    ServerCommands
  23. def decr(key: Buf): Future[Long]

    Permalink

    Decrements number stored at key by 1.

    Decrements number stored at key by 1.

    returns

    value after decrement.

    Definition Classes
    StringCommands
  24. def decrBy(key: Buf, amount: Long): Future[Long]

    Permalink

    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

    returns

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

    Definition Classes
    StringCommands
  25. def dels(keys: Seq[Buf]): Future[Long]

    Permalink

    Removes keys

    Removes keys

    keys

    list of keys to remove

    returns

    Number of keys removed

    Definition Classes
    KeyCommands
  26. def dump(key: Buf): Future[Option[Buf]]

    Permalink

    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

    returns

    bytes, or none if the key did not exist

    Definition Classes
    KeyCommands
  27. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  29. def eval(script: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[Reply]

    Permalink

    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])
    script

    the script to execute

    keys

    the redis keys that the script may have access to

    argv

    the array of arguments that the script takes

    returns

    redis-server Reply

    Definition Classes
    ScriptCommands
  30. def evalSha(sha: Buf, script: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[Reply]

    Permalink

    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

    SHA-1 digest of the script to execute

    script

    the fallback script. User must guarantee that

    sha == SHA1(script)

    where "SHA1" computes the SHA-1 digest (as a HEX string) of script.

    keys

    the redis keys that the script may have access to

    argv

    the array of arguments that the script takes

    returns

    redis-server Reply

    Definition Classes
    ScriptCommands
  31. def evalSha(sha: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[Reply]

    Permalink

    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

    SHA-1 digest of the script to execute

    keys

    the redis keys that the script may have access to

    argv

    the array of arguments that the script takes

    returns

    redis-server Reply

    Definition Classes
    ScriptCommands
  32. def exists(key: Buf): Future[Boolean]

    Permalink

    Checks if given key exists

    Checks if given key exists

    returns

    true if key exists, false otherwise

    Definition Classes
    KeyCommands
  33. def expire(key: Buf, ttl: Long): Future[Boolean]

    Permalink

    Sets how long it will take the key to expire

    Sets how long it will take the key to expire

    returns

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

    Definition Classes
    KeyCommands
  34. def expireAt(key: Buf, ttl: Long): Future[Boolean]

    Permalink

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

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

    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
    KeyCommands
  35. val factory: ServiceFactory[Command, Reply]

    Permalink
    Definition Classes
    ClientBaseClient
  36. def finalize(): Unit

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

    Permalink

    Deletes all keys in all databases

    Deletes all keys in all databases

    Definition Classes
    ServerCommands
  38. def flushDB(): Future[Unit]

    Permalink

    Deletes all keys in current DB

    Deletes all keys in current DB

    Definition Classes
    ServerCommands
  39. def geoAdd(key: Buf, members: GeoMember*): Future[Long]

    Permalink

    Adds member -> score pair members to sorted set under the key.

    Adds member -> score pair members to sorted set under the key.

    returns

    The number of elements added to sorted set.

    Definition Classes
    GeoCommands
    Note

    Adding multiple elements only works with redis 2.4 or later.

  40. def geoDistance(key: Buf, fromMember: Buf, toMember: Buf, distanceUnit: GeoUnit = GeoUnit.Meter): Future[Option[Double]]

    Permalink

    key

    the GeoSet to search

    fromMember

    the first member in the query

    toMember

    the second member in the query

    distanceUnit

    the units used for distance

    returns

    distance between two GeoSet members

    Definition Classes
    GeoCommands
  41. def geoHash(key: Buf, members: Buf*): Future[Seq[Option[String]]]

    Permalink

    Gets the geohash of members in sorted set at the key.

    Gets the geohash of members in sorted set at the key.

    https://redis.io/commands/geohash

    key

    the GeoSet to search for the member

    members

    the GeoSet members whose geo hash we want

    Definition Classes
    GeoCommands
  42. def geoPosition(key: Buf, members: Buf*): Future[Seq[Option[(Double, Double)]]]

    Permalink

    key

    the GeoSet to search

    members

    the members to get lat/lon for

    returns

    the lon/lat of the queried member

    Definition Classes
    GeoCommands
  43. def geoRadius(key: Buf, longitude: Double, latitude: Double, radius: Double, unit: GeoUnit, withCoord: Boolean = false, withDist: Boolean = false, withHash: Boolean = false, count: Option[Int] = None, sort: Option[Sort] = None, store: Option[Buf] = None, storeDist: Option[Buf] = None): Future[Seq[Option[GeoRadiusResult]]]

    Permalink

    Get the members of a sorted set which are within the borders of the area specified with the center location * and the maximum distance from the center (the radius).

    Get the members of a sorted set which are within the borders of the area specified with the center location * and the maximum distance from the center (the radius).

    returns

    Future of an array where each member represents element. Each element additionally contains coordinate, distance and geohash if options are specified

    Definition Classes
    GeoCommands
  44. def geoRadiusByMember(key: Buf, member: Buf, radius: Double, unit: GeoUnit, withCoord: Boolean = false, withDist: Boolean = false, withHash: Boolean = false, count: Option[Int] = None, sort: Option[Sort] = None, store: Option[Buf] = None, storeDist: Option[Buf] = None): Future[Seq[Option[GeoRadiusResult]]]

    Permalink

    Get the members of a sorted set which are within the borders of the area specified with the center location of a member.

    Get the members of a sorted set which are within the borders of the area specified with the center location of a member.

    returns

    Future of an array where each member represents element. Each element additionally contains coordinate, distance and geohash if options are specified

    Definition Classes
    GeoCommands
  45. def geoRem(key: Buf, members: Seq[Buf]): Future[Long]

    Permalink

    Geo removal, equivalent to sorted set removal as GeoSets are SortedSets underneath

    Geo removal, equivalent to sorted set removal as GeoSets are SortedSets underneath

    key

    the GeoSet to remove members from

    members

    the members to remove

    returns

    the number of members removed from the set

    Definition Classes
    GeoCommands
  46. def get(key: Buf): Future[Option[Buf]]

    Permalink

    Gets the value associated with the given key

    Gets the value associated with the given key

    returns

    value, or none if key doesn't exist

    Definition Classes
    StringCommands
  47. def getBit(key: Buf, offset: Int): Future[Long]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/getbit

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

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

    Permalink

    Gets the substring of the value associated with given key

    Gets the substring of the value associated with given key

    returns

    substring, or none if key doesn't exist

    Definition Classes
    StringCommands
  50. def getSet(key: Buf, value: Buf): Future[Option[Buf]]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/getset

  51. def hDel(key: Buf, fields: Seq[Buf]): Future[Long]

    Permalink

    Deletes fields from given hash key.

    Deletes fields from given hash key. Returns the number of fields deleted.

    Definition Classes
    HashCommands
  52. def hExists(key: Buf, field: Buf): Future[Boolean]

    Permalink

    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.

    Definition Classes
    HashCommands
  53. def hGet(key: Buf, field: Buf): Future[Option[Buf]]

    Permalink

    Gets field from a given hash key.

    Gets field from a given hash key.

    Definition Classes
    HashCommands
  54. def hGetAll(key: Buf): Future[Seq[(Buf, Buf)]]

    Permalink

    Gets all field value pairs for given hash key.

    Gets all field value pairs for given hash key.

    Definition Classes
    HashCommands
  55. def hIncrBy(key: Buf, field: Buf, amount: Long): Future[Long]

    Permalink

    Increments a field on a given hash key by amount.

    Increments a field on a given hash key by amount. Returns new field value.

    Definition Classes
    HashCommands
  56. def hKeys(key: Buf): Future[Seq[Buf]]

    Permalink

    Returns all field names stored at the hash key.

    Returns all field names stored at the hash key.

    Definition Classes
    HashCommands
  57. def hLen(key: Buf): Future[Long]

    Permalink

    Returns the number of fields stored at the hash key.

    Returns the number of fields stored at the hash key.

    Definition Classes
    HashCommands
  58. def hMGet(key: Buf, fields: Seq[Buf]): Future[Seq[Buf]]

    Permalink

    Gets values for given fields stored at the hash key.

    Gets values for given fields stored at the hash key.

    Definition Classes
    HashCommands
  59. def hMSet(key: Buf, fv: Map[Buf, Buf]): Future[Unit]

    Permalink

    Sets values for given fields stored at the hash key.

    Sets values for given fields stored at the hash key.

    Definition Classes
    HashCommands
  60. def hMSetEx(key: Buf, fv: Map[Buf, Buf], milliseconds: Long): Future[Unit]

    Permalink

    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.

    Definition Classes
    HashCommands
  61. def hMergeEx(key: Buf, fv: Map[Buf, Buf], milliseconds: Long): Future[Unit]

    Permalink

    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.

    Definition Classes
    HashCommands
  62. def hScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Permalink

    Returns keys in given hash key, starting at cursor.

    Returns keys in given hash key, starting at cursor.

    Definition Classes
    HashCommands
  63. def hSet(key: Buf, field: Buf, value: Buf): Future[Long]

    Permalink

    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.

    Definition Classes
    HashCommands
  64. def hSetNx(key: Buf, field: Buf, value: Buf): Future[Long]

    Permalink

    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.

    Definition Classes
    HashCommands
  65. def hStrlen(key: Buf, field: Buf): Future[Long]

    Permalink
    Definition Classes
    HashCommands
  66. def hVals(key: Buf): Future[Seq[Buf]]

    Permalink

    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.

    Definition Classes
    HashCommands
  67. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  68. def incr(key: Buf): Future[Long]

    Permalink

    Increments the number stored at key by one.

    Increments the number stored at key by one.

    returns

    the value of key after the increment.

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/incr

  69. def incrBy(key: Buf, increment: Long): Future[Long]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/incrby

  70. def info(section: Buf): Future[Option[Buf]]

    Permalink

    Returns information and statistics about the server

    Returns information and statistics about the server

    section

    used to select a specific section of information.

    returns

    a collection of \r\n terminated lines if server has info on the section

    Definition Classes
    BasicServerCommands
  71. def info(): Future[Option[Buf]]

    Permalink

    Returns information and statistics about the server

    Returns information and statistics about the server

    returns

    Buf with collection of \r\n terminated lines of the default info section

    Definition Classes
    BasicServerCommands
  72. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  73. def keys(pattern: Buf): Future[Seq[Buf]]

    Permalink

    Returns all keys matching pattern

    Returns all keys matching pattern

    returns

    list of keys matching pattern

    Definition Classes
    KeyCommands
  74. def lIndex(key: Buf, index: Long): Future[Option[Buf]]

    Permalink

    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.

    returns

    Some if the given element exists, None otherwise.

    Definition Classes
    ListCommands
  75. def lInsertAfter(key: Buf, pivot: Buf, value: Buf): Future[Option[Long]]

    Permalink

    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.

    returns

    Some of the new length of the list. None if the pivot is not found, or the list is empty.

    Definition Classes
    ListCommands
  76. def lInsertBefore(key: Buf, pivot: Buf, value: Buf): Future[Option[Long]]

    Permalink

    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.

    returns

    Some of the new length of the list, or None if the pivot is not found, or the list is empty.

    Definition Classes
    ListCommands
  77. def lLen(key: Buf): Future[Long]

    Permalink

    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).

    Definition Classes
    ListCommands
  78. def lPop(key: Buf): Future[Option[Buf]]

    Permalink

    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.

    returns

    Some of the value of the popped element, or None if the list is empty.

    Definition Classes
    ListCommands
  79. def lPush(key: Buf, values: List[Buf]): Future[Long]

    Permalink

    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.

    returns

    The length of the list.

    Definition Classes
    ListCommands
  80. def lRange(key: Buf, start: Long, end: Long): Future[List[Buf]]

    Permalink

    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.

    Definition Classes
    ListCommands
  81. def lRem(key: Buf, count: Long, value: Buf): Future[Long]

    Permalink

    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.

    returns

    The number of removed elements.

    Definition Classes
    ListCommands
    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.

  82. def lSet(key: Buf, index: Long, value: Buf): Future[Unit]

    Permalink

    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.

    Definition Classes
    ListCommands
  83. def lTrim(key: Buf, start: Long, end: Long): Future[Unit]

    Permalink

    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).

    Definition Classes
    ListCommands
  84. def mGet(keys: Seq[Buf]): Future[Seq[Option[Buf]]]

    Permalink

    Returns the values of all specified keys.

    Returns the values of all specified keys.

    returns

    list of values at the specified keys.

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/mget

  85. def mSet(kv: Map[Buf, Buf]): Future[Unit]

    Permalink

    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.

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/mset

  86. def mSetNx(kv: Map[Buf, Buf]): Future[Boolean]

    Permalink

    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.

    returns

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

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/msetnx

  87. def migrate(destAddr: InetSocketAddress, keys: Seq[Buf], timeout: Duration = 5.seconds): Future[Unit]

    Permalink

    Migrates all keys to the destination server

    Migrates all keys to the destination server

    destAddr

    target redis server

    keys

    list of keys to be migrated

    timeout

    timeout before failing, defaults to 5 seconds

    returns

    unit

    Definition Classes
    KeyCommands
  88. def move(key: Buf, db: Buf): Future[Boolean]

    Permalink

    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
    KeyCommands
  89. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  90. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  91. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  92. def pExpire(key: Buf, milliseconds: Long): Future[Boolean]

    Permalink

    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
    KeyCommands
    See also

    http://redis.io/commands/pexpire

  93. def pExpireAt(key: Buf, timestamp: Long): Future[Boolean]

    Permalink

    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
    KeyCommands
    See also

    http://redis.io/commands/pexpireat

  94. def pSetEx(key: Buf, millis: Long, value: Buf): Future[Unit]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/psetex

  95. def pSubscribe(patterns: Seq[Buf])(handler: MessageHandler): Future[Map[Buf, Throwable]]

    Permalink

    Subscribe to patterns.

    Subscribe to patterns. Messages received from the subscribed patterns will be processed by the handler.

    A pattern will be subscribed to only once. Subscribing to an already subscribed pattern will be ignored. Although a Seq is passed in as argument, the patterns are subscribed to one by one, with individual commands, and when the client is connected to multiple server nodes, it is not guaranteed that they are subscribed to from the same node.

    When the Future returned by this method is completed, it is guaranteed that an attempt is made, to send a pSubscribe command for each of the patterns that is not subscribed to yet. And the failed subscriptions are returned as a map from the failed channel to the exception object. Subscriptions will be managed by the SubscriptionManager, even if it failed at the first attempt. In that case, subsequent attempts will be made regularly until the pattern is subscribed to successfully, or the subscription is cancelled by calling the pUnsubscribed method.

    Definition Classes
    SubscribeCommands
  96. def pTtl(key: Buf): Future[Option[Long]]

    Permalink

    Get the time to live for a key in milliseconds.

    Get the time to live for a key in milliseconds.

    returns

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

    Definition Classes
    KeyCommands
  97. def pUnsubscribe(patterns: Seq[Buf]): Future[Map[Buf, Throwable]]

    Permalink

    Unsubscribe from patterns.

    Unsubscribe from patterns. The subscriptions to the specified patterns are removed from the SubscriptionManager. An unsubscribe command is sent for each of the succeeded subscriptions, and the failed ones are returned as a Future of map from the pattern to the exception object.

    Definition Classes
    SubscribeCommands
  98. def persist(key: Buf): Future[Long]

    Permalink

    Persist a key by removing it's expiration time

    Persist a key by removing it's expiration time

    returns

    1 if ttl was removed, 0 if key doesn't exist or doesn't have a ttl

    Definition Classes
    KeyCommands
  99. def pfAdd(key: Buf, elements: List[Buf]): Future[Boolean]

    Permalink

    Adds elements to a HyperLogLog data structure stored under hash key.

    Adds elements to a HyperLogLog data structure stored under hash key.

    returns

    Whether a bit was set in the HyperLogLog data structure.

    Definition Classes
    HyperLogLogCommands
    See also

    http://redis.io/commands/pfadd

  100. def pfCount(keys: Seq[Buf]): Future[Long]

    Permalink

    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.

    Definition Classes
    HyperLogLogCommands
    See also

    http://redis.io/commands/pfcount

  101. def pfMerge(destKey: Buf, srcKeys: Seq[Buf]): Future[Unit]

    Permalink

    Merges HyperLogLogs at srcKeys to create a new HyperLogLog at destKey.

    Merges HyperLogLogs at srcKeys to create a new HyperLogLog at destKey.

    Definition Classes
    HyperLogLogCommands
    See also

    http://redis.io/commands/pfmerge

  102. def ping(): Future[Unit]

    Permalink

    Sends a PING to Redis instance

    Sends a PING to Redis instance

    Definition Classes
    BasicConnectionCommands
  103. def pubSubChannels(pattern: Option[Buf] = None): Future[Seq[Buf]]

    Permalink

    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).

    Definition Classes
    PubSubCommands
  104. def pubSubNumPat(): Future[Long]

    Permalink

    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).

    Definition Classes
    PubSubCommands
  105. def pubSubNumSub(channels: Seq[Buf]): Future[Map[Buf, Long]]

    Permalink

    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.

    Definition Classes
    PubSubCommands
  106. def publish(channel: Buf, message: Buf): Future[Long]

    Permalink

    Publishes a message to the specified channel.

    Publishes a message to the specified channel.

    Definition Classes
    PubSubCommands
  107. def quit(): Future[Unit]

    Permalink

    Closes connection to Redis instance

    Closes connection to Redis instance

    Definition Classes
    BasicConnectionCommands
  108. def rPop(key: Buf): Future[Option[Buf]]

    Permalink

    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.

    returns

    Some of the value of the popped element, or None if the list is empty.

    Definition Classes
    ListCommands
  109. def rPush(key: Buf, values: List[Buf]): Future[Long]

    Permalink

    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.

    returns

    The length of the list.

    Definition Classes
    ListCommands
  110. def sAdd(key: Buf, members: List[Buf]): Future[Long]

    Permalink

    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.

    returns

    The number of new members added to the set.

    Definition Classes
    SetCommands
  111. def sCard(key: Buf): Future[Long]

    Permalink

    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.

    Definition Classes
    SetCommands
  112. def sInter(keys: Seq[Buf]): Future[Set[Buf]]

    Permalink

    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.

    Definition Classes
    SetCommands
  113. def sIsMember(key: Buf, member: Buf): Future[Boolean]

    Permalink

    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.

    Definition Classes
    SetCommands
  114. def sMembers(key: Buf): Future[Set[Buf]]

    Permalink

    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.

    Definition Classes
    SetCommands
  115. def sPop(key: Buf): Future[Option[Buf]]

    Permalink

    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.

    returns

    Some if the member exists, or None if the set is empty.

    Definition Classes
    SetCommands
  116. def sRandMember(key: Buf, count: Option[Int] = None): Future[Seq[Buf]]

    Permalink

    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.

    Definition Classes
    SetCommands
  117. def sRem(key: Buf, members: List[Buf]): Future[Long]

    Permalink

    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.

    returns

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

    Definition Classes
    SetCommands
  118. def sScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Permalink

    Returns keys in given set key, starting at cursor.

    Returns keys in given set key, starting at cursor.

    Definition Classes
    SetCommands
  119. def scans(cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Permalink

    Returns keys starting at cursor

    Returns keys starting at cursor

    returns

    cursor followed by matching keys

    Definition Classes
    KeyCommands
  120. def scriptExists(digests: Buf*): Future[Seq[Boolean]]

    Permalink

    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.

    Definition Classes
    ScriptCommands
  121. def scriptFlush(): Future[Unit]

    Permalink

    Flushes the script cache on redis-server.

    Flushes the script cache on redis-server.

    Definition Classes
    ScriptCommands
  122. def scriptLoad(script: Buf): Future[Buf]

    Permalink

    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.

    Definition Classes
    ScriptCommands
  123. def select(index: Int): Future[Unit]

    Permalink

    Select DB with specified zero-based index

    Select DB with specified zero-based index

    Definition Classes
    ConnectionCommands
  124. def set(key: Buf, value: Buf): Future[Unit]

    Permalink

    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

    Definition Classes
    StringCommands
  125. def setBit(key: Buf, offset: Int, value: Int): Future[Long]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/setbit

  126. def setEx(key: Buf, seconds: Long, value: Buf): Future[Unit]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/setex

  127. def setExNx(key: Buf, seconds: Long, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  128. def setExXx(key: Buf, seconds: Long, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  129. def setNx(key: Buf, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/setnx

  130. def setPx(key: Buf, millis: Long, value: Buf): Future[Unit]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  131. def setPxNx(key: Buf, millis: Long, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  132. def setPxXx(key: Buf, millis: Long, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  133. def setRange(key: Buf, offset: Int, value: Buf): Future[Long]

    Permalink

    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
    StringCommands
    See also

    http://redis.io/commands/setrange

  134. def setXx(key: Buf, value: Buf): Future[Boolean]

    Permalink

    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
    StringCommands
    See also

    http://redis.io.commands/set

  135. def slaveOf(host: Buf, port: Buf): Future[Unit]

    Permalink
    Definition Classes
    ServerCommands
  136. def strlen(key: Buf): Future[Long]

    Permalink

    returns the length of the string value stored at key.

    returns the length of the string value stored at key.

    returns

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

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/strlen

  137. def subscribe(channels: Seq[Buf])(handler: MessageHandler): Future[Map[Buf, Throwable]]

    Permalink

    Subscribe to channels.

    Subscribe to channels. Messages received from the subscribed channels will be processed by the handler.

    A channel will be subscribed to only once. Subscribing to an already subscribed channel will be ignored. Although a Seq is passed in as argument, the channels are subscribed to one by one, with individual commands, and when the client is connected to multiple server nodes, it is not guaranteed that they are subscribed to from the same node.

    When the Future returned by this method is completed, it is guaranteed that an attempt is made, to send a subscribe command for each of the channels that is not subscribed to yet. And the failed subscriptions are returned as a map from the failed channel to the exception object. Subscriptions will be managed by the SubscriptionManager, even if it failed at the first attempt. In that case, subsequent attempts will be made regularly until the channel is subscribed to successfully, or the subscription is cancelled by calling the unsubscribed method.

    Definition Classes
    SubscribeCommands
  138. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  139. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  140. def topologyAdd(key: Buf, value: Buf): Future[Unit]

    Permalink

    Adds a key : value pair to a topology.

    Adds a key : value pair to a topology.

    Definition Classes
    TopologyCommands
  141. def topologyDelete(key: Buf): Future[Unit]

    Permalink

    Deletes a pair with a key from a topology.

    Deletes a pair with a key from a topology.

    Definition Classes
    TopologyCommands
  142. def topologyGet(key: Buf): Future[Option[Buf]]

    Permalink

    Gets a value stored under key from a topology.

    Gets a value stored under key from a topology.

    Definition Classes
    TopologyCommands
  143. def transaction[T](f: (NormalCommands) ⇒ Future[_]): Future[Seq[Reply]]

    Permalink
    Definition Classes
    Transactions
  144. def transaction[T](cmds: Seq[Command]): Future[Seq[Reply]]

    Permalink
    Definition Classes
    Transactions
  145. def transactionSupport[T](f: (TransactionalClient) ⇒ Future[T]): Future[T]

    Permalink
    Definition Classes
    Transactions
  146. def ttl(key: Buf): Future[Option[Long]]

    Permalink

    Gets the ttl of the given key.

    Gets the ttl of the given key.

    returns

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

    Definition Classes
    KeyCommands
  147. def unsubscribe(channels: Seq[Buf]): Future[Map[Buf, Throwable]]

    Permalink

    Unsubscribe from channels.

    Unsubscribe from channels. The subscriptions to the specified channels are removed from the SubscriptionManager. An unsubscribe command is sent for each of the succeeded subscriptions, and the failed ones are returned as a Future of map from the channel to the exception object.

    Definition Classes
    SubscribeCommands
  148. final def wait(): Unit

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

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

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

    Permalink

    Adds a member with score to a sorted set under the key.

    Adds a member with score to a sorted set under the key.

    returns

    The number of elements added to sorted set.

    Definition Classes
    SortedSetCommands
  152. def zAddMulti(key: Buf, members: Seq[(Double, Buf)]): Future[Long]

    Permalink

    Adds member -> score pair members to sorted set under the key.

    Adds member -> score pair members to sorted set under the key.

    returns

    The number of elements added to sorted set.

    Definition Classes
    SortedSetCommands
    Note

    Adding multiple elements only works with redis 2.4 or later.

  153. def zCard(key: Buf): Future[Long]

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  154. def zCount(key: Buf, min: ZInterval, max: ZInterval): Future[Long]

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  155. def zIncrBy(key: Buf, amount: Double, member: Buf): Future[Option[Double]]

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  156. def zRange(key: Buf, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[Buf]]]

    Permalink

    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.

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

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  158. def zRank(key: Buf, member: Buf): Future[Option[Long]]

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  159. def zRem(key: Buf, members: Seq[Buf]): Future[Long]

    Permalink

    Removes specified members from sorted set at key.

    Removes specified members from sorted set at key.

    returns

    The number of members removed.

    Definition Classes
    SortedSetCommands
  160. def zRemRangeByRank(key: Buf, start: Long, stop: Long): Future[Long]

    Permalink

    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.

    returns

    The number of members removed from sorted set.

    Definition Classes
    SortedSetCommands
  161. def zRemRangeByScore(key: Buf, min: ZInterval, max: ZInterval): Future[Long]

    Permalink

    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.

    returns

    The number of members removed from sorted set.

    Definition Classes
    SortedSetCommands
  162. def zRevRange(key: Buf, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[Buf]]]

    Permalink

    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.

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

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  164. def zRevRank(key: Buf, member: Buf): Future[Option[Long]]

    Permalink

    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.

    Definition Classes
    SortedSetCommands
  165. def zScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Permalink

    Returns keys in given set key, starting at cursor.

    Returns keys in given set key, starting at cursor.

    Definition Classes
    SortedSetCommands
  166. def zScore(key: Buf, member: Buf): Future[Option[Double]]

    Permalink

    Gets the score of a member in sorted set at the key.

    Gets the score of a member in sorted set at the key.

    Definition Classes
    SortedSetCommands

Inherited from Transactions

Inherited from SubscribeCommands

Inherited from NormalCommands

Inherited from ConnectionCommands

Inherited from BasicConnectionCommands

Inherited from ScriptCommands

Inherited from ServerCommands

Inherited from BasicServerCommands

Inherited from PubSubCommands

Inherited from GeoCommands

Inherited from HyperLogLogCommands

Inherited from TopologyCommands

Inherited from BtreeSortedSetCommands

Inherited from SetCommands

Inherited from ListCommands

Inherited from SortedSetCommands

Inherited from HashCommands

Inherited from StringCommands

Inherited from KeyCommands

Inherited from BaseClient

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped