Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package twitter

    Start with com.twitter.finagle.

    Definition Classes
    com
  • package finagle

    Finagle is an extensible RPC system.

    Finagle is an extensible RPC system.

    Services are represented by class com.twitter.finagle.Service. Clients make use of com.twitter.finagle.Service objects while servers implement them.

    Finagle contains a number of protocol implementations; each of these implement Client and/or com.twitter.finagle.Server. For example, Finagle's HTTP implementation, com.twitter.finagle.Http (in package finagle-http), exposes both.

    Thus a simple HTTP server is built like this:

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Await, Future}
    
    val service = new Service[Request, Response] {
      def apply(req: Request): Future[Response] =
        Future.value(Response())
    }
    val server = Http.server.serve(":8080", service)
    Await.ready(server)

    We first define a service to which requests are dispatched. In this case, the service returns immediately with a HTTP 200 OK response, and with no content.

    This service is then served via the Http protocol on TCP port 8080. Finally we wait for the server to stop serving.

    We can now query our web server:

    % curl -D - localhost:8080
    HTTP/1.1 200 OK

    Building an HTTP client is also simple. (Note that type annotations are added for illustration.)

    import com.twitter.finagle.{Http, Service}
    import com.twitter.finagle.http.{Request, Response}
    import com.twitter.util.{Future, Return, Throw}
    
    val client: Service[Request, Response] = Http.client.newService("localhost:8080")
    val f: Future[Response] = client(Request()).respond {
      case Return(rep) =>
        printf("Got HTTP response %s\n", rep)
      case Throw(exc) =>
        printf("Got error %s\n", exc)
    }

    Http.client.newService("localhost:8080") constructs a new com.twitter.finagle.Service instance connected to localhost TCP port 8080. We then issue a HTTP/1.1 GET request to URI "/". The service returns a com.twitter.util.Future representing the result of the operation. We listen to this future, printing an appropriate message when the response arrives.

    The Finagle homepage contains useful documentation and resources for using Finagle.

    Definition Classes
    twitter
  • package redis
    Definition Classes
    finagle
  • package exp
    Definition Classes
    redis
  • package protocol
    Definition Classes
    redis
  • package util
    Definition Classes
    redis
  • BaseClient
  • Client
  • ClientError
  • ConnectionCommands
  • NormalCommands
  • ReplyCastFailure
  • ScriptCommands
  • SentinelClient
  • ServerCommands
  • ServerError
  • TransactionalClient
  • Transactions
t

com.twitter.finagle.redis

NormalCommands

trait NormalCommands extends KeyCommands with StringCommands with HashCommands with SortedSetCommands with ListCommands with SetCommands with BtreeSortedSetCommands with TopologyCommands with HyperLogLogCommands with PubSubCommands with ServerCommands with ScriptCommands with ConnectionCommands

Self Type
NormalCommands with BaseClient
Linear Supertypes
ConnectionCommands, BasicConnectionCommands, ScriptCommands, ServerCommands, BasicServerCommands, PubSubCommands, HyperLogLogCommands, TopologyCommands, BtreeSortedSetCommands, SetCommands, ListCommands, SortedSetCommands, HashCommands, StringCommands, KeyCommands, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NormalCommands
  2. ConnectionCommands
  3. BasicConnectionCommands
  4. ScriptCommands
  5. ServerCommands
  6. BasicServerCommands
  7. PubSubCommands
  8. HyperLogLogCommands
  9. TopologyCommands
  10. BtreeSortedSetCommands
  11. SetCommands
  12. ListCommands
  13. SortedSetCommands
  14. HashCommands
  15. StringCommands
  16. KeyCommands
  17. AnyRef
  18. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val FutureFalse: Future[Boolean]
    Definition Classes
    StringCommands
  5. val FutureTrue: Future[Boolean]
    Definition Classes
    StringCommands
  6. def append(key: Buf, value: Buf): 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

    returns

    length of string after append operation

    Definition Classes
    StringCommands
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def auth(password: Buf): Future[Unit]

    Authorizes to db

    Authorizes to db

    Definition Classes
    ConnectionCommands
  9. def bAdd(key: Buf, field: Buf, value: Buf): 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: Buf): Future[Long]

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

    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]
    Definition Classes
    BtreeSortedSetCommands
  13. def bRange(key: Buf, count: Int, startField: Option[Buf], endField: Option[Buf]): Future[Seq[(Buf, Buf)]]

    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]

    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]
    Definition Classes
    StringCommands
  16. def bitCount(key: Buf): Future[Long]
    Definition Classes
    StringCommands
  17. def bitOp(op: Buf, dstKey: Buf, srcKeys: Seq[Buf]): Future[Long]
    Definition Classes
    StringCommands
  18. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  19. def dbSize(): Future[Long]
    Definition Classes
    ServerCommands
  20. def decr(key: Buf): Future[Long]

    Decrements number stored at key by 1.

    Decrements number stored at key by 1.

    returns

    value after decrement.

    Definition Classes
    StringCommands
  21. def decrBy(key: Buf, 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

    returns

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

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

    Removes keys

    Removes keys

    keys

    list of keys to remove

    returns

    Number of keys removed

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

    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
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  26. def eval(script: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[Reply]

    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
  27. def evalSha(sha: Buf, script: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[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

    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
  28. def evalSha(sha: Buf, keys: Seq[Buf], argv: Seq[Buf]): Future[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

    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
  29. def exists(key: Buf): Future[Boolean]

    Checks if given key exists

    Checks if given key exists

    returns

    true if key exists, false otherwise

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

    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
  31. def expireAt(key: Buf, 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

    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
  32. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. def flushAll(): Future[Unit]

    Deletes all keys in all databases

    Deletes all keys in all databases

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

    Deletes all keys in current DB

    Deletes all keys in current DB

    Definition Classes
    ServerCommands
  35. def get(key: Buf): Future[Option[Buf]]

    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
  36. def getBit(key: Buf, 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
    StringCommands
    See also

    http://redis.io/commands/getbit

  37. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  38. def getRange(key: Buf, start: Long, end: Long): Future[Option[Buf]]

    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
  39. def getSet(key: Buf, value: Buf): Future[Option[Buf]]

    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

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

    Deletes fields from given hash key.

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

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

    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
  42. def hGet(key: Buf, field: Buf): Future[Option[Buf]]

    Gets field from a given hash key.

    Gets field from a given hash key.

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

    Gets all field value pairs for given hash key.

    Gets all field value pairs for given hash key.

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

    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
  45. def hKeys(key: Buf): Future[Seq[Buf]]

    Returns all field names stored at the hash key.

    Returns all field names stored at the hash key.

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

    Returns the number of fields stored at the hash key.

    Returns the number of fields stored at the hash key.

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

    Gets values for given fields stored at the hash key.

    Gets values for given fields stored at the hash key.

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

    Sets values for given fields stored at the hash key.

    Sets values for given fields stored at the hash key.

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

    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
  50. def hMergeEx(key: Buf, fv: Map[Buf, Buf], milliseconds: Long): Future[Unit]

    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
  51. def hScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Returns keys in given hash key, starting at cursor.

    Returns keys in given hash key, starting at cursor.

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

    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
  53. def hSetNx(key: Buf, field: Buf, value: Buf): Future[Long]

    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
  54. def hStrlen(key: Buf, field: Buf): Future[Long]
    Definition Classes
    HashCommands
  55. def hVals(key: Buf): Future[Seq[Buf]]

    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
  56. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  57. def incr(key: Buf): Future[Long]

    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

  58. def incrBy(key: Buf, 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
    StringCommands
    See also

    http://redis.io/commands/incrby

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

    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
  60. def info(): Future[Option[Buf]]

    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
  61. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  62. def keys(pattern: Buf): Future[Seq[Buf]]

    Returns all keys matching pattern

    Returns all keys matching pattern

    returns

    list of keys matching pattern

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

    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
  64. def lInsertAfter(key: Buf, pivot: Buf, value: Buf): Future[Option[Long]]

    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
  65. def lInsertBefore(key: Buf, pivot: Buf, value: Buf): Future[Option[Long]]

    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
  66. def lLen(key: Buf): Future[Long]

    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
  67. def lPop(key: Buf): Future[Option[Buf]]

    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
  68. def lPush(key: Buf, values: List[Buf]): Future[Long]

    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
  69. def lRange(key: Buf, start: Long, end: Long): Future[List[Buf]]

    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
  70. def lRem(key: Buf, count: Long, value: Buf): Future[Long]

    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.

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

    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
  72. def lTrim(key: Buf, start: Long, end: Long): Future[Unit]

    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
  73. def mGet(keys: Seq[Buf]): Future[Seq[Option[Buf]]]

    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

  74. def mSet(kv: Map[Buf, Buf]): 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.

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/mset

  75. def mSetNx(kv: Map[Buf, Buf]): 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.

    returns

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

    Definition Classes
    StringCommands
    See also

    http://redis.io/commands/msetnx

  76. def move(key: Buf, db: Buf): 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
    KeyCommands
  77. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  78. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  79. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  80. def pExpire(key: Buf, 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
    KeyCommands
    See also

    http://redis.io/commands/pexpire

  81. def pExpireAt(key: Buf, 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
    KeyCommands
    See also

    http://redis.io/commands/pexpireat

  82. def pSetEx(key: Buf, millis: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io/commands/psetex

  83. def pTtl(key: Buf): Future[Option[Long]]

    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
  84. def persist(key: Buf): Future[Long]

    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
  85. def pfAdd(key: Buf, elements: List[Buf]): Future[Boolean]

    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

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

    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

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

    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

  88. def ping(): Future[Unit]

    Sends a PING to Redis instance

    Sends a PING to Redis instance

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

    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
  90. def pubSubNumPat(): Future[Long]

    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
  91. def pubSubNumSub(channels: Seq[Buf]): Future[Map[Buf, Long]]

    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
  92. def publish(channel: Buf, message: Buf): Future[Long]

    Publishes a message to the specified channel.

    Publishes a message to the specified channel.

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

    Closes connection to Redis instance

    Closes connection to Redis instance

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

    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
  95. def rPush(key: Buf, values: List[Buf]): Future[Long]

    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
  96. def sAdd(key: Buf, members: List[Buf]): Future[Long]

    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
  97. def sCard(key: Buf): Future[Long]

    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
  98. def sInter(keys: Seq[Buf]): Future[Set[Buf]]

    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
  99. def sIsMember(key: Buf, member: Buf): Future[Boolean]

    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
  100. def sMembers(key: Buf): Future[Set[Buf]]

    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
  101. def sPop(key: Buf): Future[Option[Buf]]

    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
  102. def sRandMember(key: Buf, count: Option[Int] = None): Future[Seq[Buf]]

    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
  103. def sRem(key: Buf, members: List[Buf]): Future[Long]

    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
  104. def sScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Returns keys in given set key, starting at cursor.

    Returns keys in given set key, starting at cursor.

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

    Returns keys starting at cursor

    Returns keys starting at cursor

    returns

    cursor followed by matching keys

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

    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
  107. def scriptFlush(): Future[Unit]

    Flushes the script cache on redis-server.

    Flushes the script cache on redis-server.

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

    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
  109. def select(index: Int): Future[Unit]

    Select DB with specified zero-based index

    Select DB with specified zero-based index

    Definition Classes
    ConnectionCommands
  110. def set(key: Buf, value: Buf): 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

    Definition Classes
    StringCommands
  111. def setBit(key: Buf, 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
    StringCommands
    See also

    http://redis.io/commands/setbit

  112. def setEx(key: Buf, seconds: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io/commands/setex

  113. def setExNx(key: Buf, seconds: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  114. def setExXx(key: Buf, seconds: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  115. def setNx(key: Buf, value: Buf): 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
    StringCommands
    See also

    http://redis.io/commands/setnx

  116. def setPx(key: Buf, millis: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  117. def setPxNx(key: Buf, millis: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  118. def setPxXx(key: Buf, millis: Long, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  119. def setRange(key: Buf, offset: Int, value: Buf): 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
    StringCommands
    See also

    http://redis.io/commands/setrange

  120. def setXx(key: Buf, value: Buf): 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
    StringCommands
    See also

    http://redis.io.commands/set

  121. def slaveOf(host: Buf, port: Buf): Future[Unit]
    Definition Classes
    ServerCommands
  122. def strlen(key: Buf): Future[Long]

    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

  123. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  124. def toString(): String
    Definition Classes
    AnyRef → Any
  125. def topologyAdd(key: Buf, value: Buf): Future[Unit]

    Adds a key : value pair to a topology.

    Adds a key : value pair to a topology.

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

    Deletes a pair with a key from a topology.

    Deletes a pair with a key from a topology.

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

    Gets a value stored under key from a topology.

    Gets a value stored under key from a topology.

    Definition Classes
    TopologyCommands
  128. def ttl(key: Buf): Future[Option[Long]]

    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
  129. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  131. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  132. def zAdd(key: Buf, score: Double, member: Buf): Future[Long]

    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
  133. def zAddMulti(key: Buf, members: Seq[(Double, Buf)]): Future[Long]

    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.

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

    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
  135. def zCount(key: Buf, min: ZInterval, max: ZInterval): Future[Long]

    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
  136. def zIncrBy(key: Buf, amount: Double, member: Buf): Future[Option[Double]]

    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
  137. def zRange(key: Buf, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[Buf]]]

    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
  138. def zRangeByScore(key: Buf, min: ZInterval, max: ZInterval, withScores: Boolean, limit: Option[Limit]): Future[Either[ZRangeResults, Seq[Buf]]]

    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
  139. def zRank(key: Buf, member: Buf): Future[Option[Long]]

    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
  140. def zRem(key: Buf, members: Seq[Buf]): Future[Long]

    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
  141. def zRemRangeByRank(key: Buf, start: Long, stop: Long): Future[Long]

    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
  142. def zRemRangeByScore(key: Buf, min: ZInterval, max: ZInterval): Future[Long]

    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
  143. def zRevRange(key: Buf, start: Long, stop: Long, withScores: Boolean): Future[Either[ZRangeResults, Seq[Buf]]]

    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
  144. def zRevRangeByScore(key: Buf, max: ZInterval, min: ZInterval, withScores: Boolean, limit: Option[Limit]): Future[Either[ZRangeResults, Seq[Buf]]]

    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
  145. def zRevRank(key: Buf, member: Buf): Future[Option[Long]]

    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
  146. def zScan(key: Buf, cursor: Long, count: Option[Long], pattern: Option[Buf]): Future[Seq[Buf]]

    Returns keys in given set key, starting at cursor.

    Returns keys in given set key, starting at cursor.

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

    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 ConnectionCommands

Inherited from BasicConnectionCommands

Inherited from ScriptCommands

Inherited from ServerCommands

Inherited from BasicServerCommands

Inherited from PubSubCommands

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 AnyRef

Inherited from Any

Ungrouped