class Client extends AkkaNonBlockingConnection with ConnectionCommands with ServerCommands with KeyCommands with GeoCommands with StringCommands with HashCommands with ListCommands with SetCommands with SortedSetCommands with ScriptingCommands with HyperLogLogCommands with PubSubCommands with TransactionCommands

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Client
  2. TransactionCommands
  3. PubSubCommands
  4. HyperLogLogCommands
  5. ScriptingCommands
  6. SortedSetCommands
  7. SetCommands
  8. ListCommands
  9. HashCommands
  10. StringCommands
  11. GeoCommands
  12. KeyCommands
  13. ServerCommands
  14. ConnectionCommands
  15. AkkaNonBlockingConnection
  16. TransactionEnabledConnection
  17. NonBlockingConnection
  18. AbstractAkkaConnection
  19. LazyLogging
  20. Connection
  21. AnyRef
  22. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Client(configName: String, path: String)(implicit system: ActorSystem)

    Constructs a scredis.Client instance from a config file and using the provided path.

    Constructs a scredis.Client instance from a config file and using the provided path.

    configName

    config filename

    path

    path pointing to the scredis config object

    returns

    the constructed scredis.Client

    Note

    The path must include to the scredis object, e.g. x.y.scredis

  2. new Client(configName: String)(implicit system: ActorSystem)

    Constructs a scredis.Client instance from a config file.

    Constructs a scredis.Client instance from a config file.

    configName

    config filename

    returns

    the constructed scredis.Client

    Note

    The config file must contain the scredis object at its root. This constructor is equivalent to

    new Client(configName, "scredis")
  3. new Client(config: Config)(implicit system: ActorSystem)

    Constructs a scredis.Client instance from a com.typesafe.Config

    Constructs a scredis.Client instance from a com.typesafe.Config

    config

    com.typesafe.Config

    returns

    the constructed scredis.Client

    Note

    The config must contain the scredis object at its root. This constructor is equivalent to

    new Client(config, "scredis")
  4. new Client(config: RedisConfig)(implicit system: ActorSystem)

    Constructs a scredis.Client instance from a scredis.RedisConfig

    Constructs a scredis.Client instance from a scredis.RedisConfig

    config

    scredis.RedisConfig

    returns

    the constructed scredis.Client

  5. new Client(host: String = RedisConfigDefaults.Redis.Host, port: Int = RedisConfigDefaults.Redis.Port, authOpt: Option[AuthConfig] = RedisConfigDefaults.Redis.AuthOpt, database: Int = RedisConfigDefaults.Redis.Database, nameOpt: Option[String] = RedisConfigDefaults.Redis.NameOpt, connectTimeout: FiniteDuration = RedisConfigDefaults.IO.ConnectTimeout, receiveTimeoutOpt: Option[FiniteDuration] = RedisConfigDefaults.IO.ReceiveTimeoutOpt, maxWriteBatchSize: Int = RedisConfigDefaults.IO.MaxWriteBatchSize, tcpSendBufferSizeHint: Int = RedisConfigDefaults.IO.TCPSendBufferSizeHint, tcpReceiveBufferSizeHint: Int = RedisConfigDefaults.IO.TCPReceiveBufferSizeHint, akkaListenerDispatcherPath: String = RedisConfigDefaults.IO.Akka.ListenerDispatcherPath, akkaIODispatcherPath: String = RedisConfigDefaults.IO.Akka.IODispatcherPath, akkaDecoderDispatcherPath: String = RedisConfigDefaults.IO.Akka.DecoderDispatcherPath, failCommandOnConnecting: Boolean = RedisConfigDefaults.Global.FailCommandOnConnecting)(implicit system: ActorSystem)

    host

    server address

    port

    server port

    authOpt

    optional server authorization credentials

    database

    database index to select

    nameOpt

    optional client name (available since 2.6.9)

    connectTimeout

    connection timeout

    receiveTimeoutOpt

    optional batch receive timeout

    maxWriteBatchSize

    max number of bytes to send as part of a batch

    tcpSendBufferSizeHint

    size hint of the tcp send buffer, in bytes

    tcpReceiveBufferSizeHint

    size hint of the tcp receive buffer, in bytes

    akkaListenerDispatcherPath

    path to listener dispatcher definition

    akkaIODispatcherPath

    path to io dispatcher definition

    akkaDecoderDispatcherPath

    path to decoder dispatcher definition

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 akkaDecoderDispatcherPath: String
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  5. val akkaIODispatcherPath: String
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  6. val akkaListenerDispatcherPath: String
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  7. def append[W](key: String, value: W)(implicit arg0: Writer[W]): Future[Long]

    Appends a value to a key.

    Appends a value to a key.

    key

    the key to be appended

    value

    the value to append

    returns

    the length of the string after the append operation

    Definition Classes
    StringCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def auth(password: String, username: Option[String] = None): Future[Unit]

    Authenticates to the server.

    Authenticates to the server.

    password

    the server password

    Definition Classes
    ConnectionCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if authentication failed

    Note

    Use the empty string to re-authenticate with no password.

  10. var authOpt: Option[AuthConfig]
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  11. def awaitTermination(timeout: Duration = Duration.Inf): Unit

    Waits for all the internal actors to be shutdown.

    Waits for all the internal actors to be shutdown.

    timeout

    amount of time to wait

    Definition Classes
    AbstractAkkaConnection
    Note

    This method is usually called after issuing a QUIT command

  12. def bgRewriteAOF(): Future[Unit]

    Asynchronously rewrites the append-only file.

    Asynchronously rewrites the append-only file.

    Definition Classes
    ServerCommands
    Since

    1.0.0

  13. def bgSave(): Future[Unit]

    Asynchronously saves the dataset to disk.

    Asynchronously saves the dataset to disk.

    Definition Classes
    ServerCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the background save is already in progress

  14. def bitCount(key: String, start: Long = 0, stop: Long = -1): Future[Long]

    Counts the number of bits set to 1 in a string from start offset to stop offset.

    Counts the number of bits set to 1 in a string from start offset to stop offset.

    key

    the key for which the bitcount should be returned

    start

    start offset (defaults to 0)

    stop

    stop offset (defaults to -1)

    returns

    the number of bits set to 1 in the specified interval

    Definition Classes
    StringCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

    Note

    Non-existent keys are treated as empty strings, so the command will return zero.

  15. def bitOp(operation: BitOp, destKey: String, keys: String*): Future[Long]

    Performs a bitwise operation between multiple strings.

    Performs a bitwise operation between multiple strings.

    operation

    scredis.BitOp to perform

    destKey

    destination key where the result of the operation will be stored

    keys

    keys to perform the operation upon

    returns

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

    Definition Classes
    StringCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if at least one of the values stored at keys is not of type string

    Note

    When an operation is performed between strings having different lengths, all the strings shorter than the longest string in the set are treated as if they were zero-padded up to the length of the longest string. The same holds true for non-existent keys, that are considered as a stream of zero bytes up to the length of the longest string.

  16. def bitPos(key: String, bit: Boolean, start: Long = 0, stop: Long = -1): Future[Long]

    Return the position of the first bit set to 1 or 0 in a string.

    Return the position of the first bit set to 1 or 0 in a string.

    key

    string key

    bit

    provide true to look for 1s and false to look for 0s

    start

    start offset, in bytes

    stop

    stop offset, in bytes

    returns

    the position of the first bit set to 1 or 0, according to the request

    Definition Classes
    StringCommands
    Since

    2.8.7

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key is not of type string

    Note

    The position is returned thinking at the string as an array of bits from left to right where the first byte most significant bit is at position 0, the second byte most significant big is at position 8 and so forth. The range is interpreted as a range of bytes and not a range of bits, so start=0 and end=2 means to look at the first three bytes. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is tree bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. However this behavior changes if you are looking for clear bits and specify a range with both start and stop. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.

  17. def clientGetName(): Future[Option[String]]

    Get the current client name.

    Get the current client name.

    returns

    option containing the name if it has been set, None otherwise

    Definition Classes
    ServerCommands
    Since

    2.6.9

  18. def clientKill(ip: String, port: Int): Future[Unit]

    Kills the connection of a client.

    Kills the connection of a client.

    ip

    ip address of the client to kill

    port

    port of the client to kill

    Definition Classes
    ServerCommands
    Since

    2.4.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the the client does not exist

  19. def clientKillWithFilters(addrOpt: Option[(String, Int)] = None, idOpt: Option[Long] = None, typeOpt: Option[ClientType] = None, skipMe: Boolean = true): Future[Long]

    Kills the connection of potentially multiple clients satisfying various filters.

    Kills the connection of potentially multiple clients satisfying various filters.

    skipMe

    when true, the calling client will not be killed, when false, the latter can be killed

    returns

    the number of killed client(s)

    Definition Classes
    ServerCommands
    Since

    2.8.12

  20. def clientList(): Future[List[Map[String, String]]]

    Lists all client connections.

    Lists all client connections.

    returns

    list of clients

    Definition Classes
    ServerCommands
    Since

    2.4.0

  21. def clientPause(timeoutMillis: Long): Future[Unit]

    Suspends all clients for the specified amount of time.

    Suspends all clients for the specified amount of time.

    timeoutMillis

    the amount of time in milliseconds for which clients should be suspended

    Definition Classes
    ServerCommands
    Since

    2.9.50

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the timeout is invalid

  22. def clientSetName(name: String): Future[Unit]

    Sets the current client name.

    Sets the current client name. If the empty string is provided, the name will be unset.

    name

    name to associate the client to, if empty, unsets the client name

    Definition Classes
    ServerCommands
    Since

    2.6.9

  23. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  24. def command(): Future[Map[String, CommandInfo]]

    Returns details about all Redis commands.

    Returns details about all Redis commands.

    returns

    map of command name to command info

    Definition Classes
    ServerCommands
    Since

    2.8.13

  25. def commandCount(): Future[Int]

    Returns the total number of commands in the target Redis server.

    Returns the total number of commands in the target Redis server.

    returns

    total number of commands

    Definition Classes
    ServerCommands
    Since

    2.8.13

  26. def commandGetKeys(command: String): Future[List[String]]

    Returns the list of keys part of a full Redis command.

    Returns the list of keys part of a full Redis command.

    returns

    the list of keys present in the command

    Definition Classes
    ServerCommands
    Since

    2.8.13

  27. def commandInfo(names: String*): Future[Map[String, CommandInfo]]

    Returns details about the specified Redis commands.

    Returns details about the specified Redis commands.

    names

    command names

    returns

    map of command name to command info

    Definition Classes
    ServerCommands
    Since

    2.8.13

  28. def configGet(pattern: String = "*"): Future[Map[String, String]]

    Gets the value of a configuration parameter.

    Gets the value of a configuration parameter.

    pattern

    name or pattern of the configuration parameter to get

    returns

    option containing the matched parameters, or None if no parameters are matched

    Definition Classes
    ServerCommands
    Since

    2.0.0

  29. def configResetStat(): Future[Unit]

    Resets the stats returned by INFO.

    Resets the stats returned by INFO.

    Definition Classes
    ServerCommands
    Since

    2.0.0

  30. def configRewrite(): Future[Unit]

    Rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflect the configuration currently used by the server, which may be different compared to the original one because of the use of the CONFIG SET command.

    Rewrites the redis.conf file the server was started with, applying the minimal changes needed to make it reflect the configuration currently used by the server, which may be different compared to the original one because of the use of the CONFIG SET command.

    Definition Classes
    ServerCommands
    Since

    2.8.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the configuration file was not properly written

  31. def configSet[W](parameter: String, value: W)(implicit arg0: Writer[W]): Future[Unit]

    Sets a configuration parameter to the given value.

    Sets a configuration parameter to the given value.

    parameter

    parameter's name

    value

    value to set parameter to

    Definition Classes
    ServerCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the parameter could not be set

  32. val connectTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  33. var database: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  34. def dbSize(): Future[Long]

    Return the number of keys in the selected database.

    Return the number of keys in the selected database.

    returns

    number of keys in the selected database

    Definition Classes
    ServerCommands
    Since

    1.0.0

  35. val decodersCount: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  36. def decr(key: String): Future[Long]

    Decrements the integer value of a key by one.

    Decrements the integer value of a key by one.

    key

    the key to decrement

    returns

    the value of key after the decrement

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type or contains a string that cannot be represented as integer

    Note

    If the key does not exist, it is set to 0 before performing the operation.

  37. def decrBy(key: String, decrement: Long): Future[Long]

    Decrements the integer value of a key by the given amount.

    Decrements the integer value of a key by the given amount.

    key

    the key to decrement

    decrement

    the decrement

    returns

    the value of key after the decrement

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type or contains a string that cannot be represented as integer

    Note

    If the key does not exist, it is set to 0 before performing the operation.

  38. def del(keys: String*): Future[Long]

    Deletes one or multiple keys.

    Deletes one or multiple keys.

    keys

    key(s) to delete

    returns

    the number of keys that were deleted

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Note

    a key is ignored if it does not exist

  39. implicit val dispatcher: ExecutionContext
    Definition Classes
    AbstractAkkaConnectionConnection
  40. def dump(key: String): Future[Option[Array[Byte]]]

    Returns a serialized version of the value stored at the specified key.

    Returns a serialized version of the value stored at the specified key.

    key

    key to dump

    returns

    the serialized value or None if the key does not exist

    Definition Classes
    KeyCommands
    Since

    2.6.0

  41. def echo(message: String): Future[String]

    Echoes the given string on the server.

    Echoes the given string on the server.

    message

    the message to echo

    returns

    the echoed message

    Definition Classes
    ConnectionCommands
    Since

    1.0.0

  42. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  44. def eval[R, W1, W2](script: String, keys: Seq[W1] = Nil, args: Seq[W2] = Nil)(implicit arg0: Decoder[R], arg1: Writer[W1], arg2: Writer[W2]): Future[R]

    Executes a Lua script that does not require any keys or arguments.

    Executes a Lua script that does not require any keys or arguments.

    script

    the LUA script

    keys

    keys to be used in the script

    args

    arguments to be used in the script

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if an error occurs while running the script

    [[scredis.exceptions.RedisProtocolException]] if the result could not be decoded by provided Decoder

  45. def evalSHA[R, W1, W2](sha1: String, keys: Seq[W1] = Nil, args: Seq[W2] = Nil)(implicit arg0: Decoder[R], arg1: Writer[W1], arg2: Writer[W2]): Future[R]

    Executes a cached Lua script that does not require any keys or arguments by its SHA1 digest.

    Executes a cached Lua script that does not require any keys or arguments by its SHA1 digest.

    sha1

    the SHA1 digest

    keys

    keys to be used in the script

    args

    arguments to be used in the script

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if there is no script corresponding to the provided SHA1 digest or if an error occurs while running the script

    [[scredis.exceptions.RedisProtocolException]] if the result could not be decoded by provided Decoder

  46. def exists(key: String): Future[Boolean]

    Determines if a key exists.

    Determines if a key exists.

    key

    key to check for existence

    returns

    true if the key exists, false otherwise

    Definition Classes
    KeyCommands
    Since

    1.0.0

  47. def expire(key: String, ttlSeconds: Int): Future[Boolean]

    Sets a key's time to live in seconds.

    Sets a key's time to live in seconds.

    key

    key to expire

    ttlSeconds

    time-to-live in seconds

    returns

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

    Definition Classes
    KeyCommands
    Since

    1.0.0

  48. def expireAt(key: String, timestamp: Long): Future[Boolean]

    Sets the expiration for a key as a UNIX timestamp.

    Sets the expiration for a key as a UNIX timestamp.

    key

    key to expire

    timestamp

    UNIX timestamp at which the key should expire

    returns

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

    Definition Classes
    KeyCommands
    Since

    1.2.0

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

    Removes all keys from all databases.

    Removes all keys from all databases.

    Definition Classes
    ServerCommands
    Since

    1.0.0

  51. def flushDB(): Future[Unit]

    Removes all keys from the current database.

    Removes all keys from the current database.

    Definition Classes
    ServerCommands
    Since

    1.0.0

  52. def geoAdd(key: String, geoAddEntries: GeoAddEntry*): Future[Long]

    Adds the specified geospatial items (longitude, latitude, name) to the specified key.

    Adds the specified geospatial items (longitude, latitude, name) to the specified key. Data is stored into the key as a sorted set, in a way that makes it possible to later retrieve items using a query by radius with the GEORADIUS or GEORADIUSBYMEMBER commands.

    The command takes arguments in the standard format x,y so the longitude must be specified before the latitude. There are limits to the coordinates that can be indexed: areas very near to the poles are not indexable. The exact limits, as specified by EPSG:900913 / EPSG:3785 / OSGEO:41001 are the following:

    Valid longitudes are from -180 to 180 degrees.
    Valid latitudes are from -85.05112878 to 85.05112878 degrees.

    The command will report an error when the user attempts to index coordinates outside the specified ranges.

    key

    Name of a sortedSet to which points will be added

    geoAddEntries

    points description consisting of 3 elements (longitude, latitude, name)

    returns

    The number of elements added to the sorted set, not including elements already existing for which the score was updated.

    Definition Classes
    GeoCommands
    Example:
    1. client.geoAdd("GeoSet", GeoAddEntry(1.11, 2.22, "Paris"), GeoAddEntry(5.55, 6.66, "Berlin"))

    Since

    3.2.0

    Exceptions thrown

    scredis.exceptions.RedisErrorResponseException if coordinates are out of expected range.

    See also

    https://redis.io/commands/geoadd

  53. def geoDist(key: String, member1: String, member2: String, unit: Option[GeoDistUnit] = None): Future[Option[Double]]

    Return the distance between two members in the geospatial index represented by the sorted set.

    Return the distance between two members in the geospatial index represented by the sorted set.

    Given a sorted set representing a geospatial index, populated using the GEOADD command, the command returns the distance between the two specified members in the specified unit.

    Units: scredis.protocol.requests.GeoDistUnit

    The distance is computed assuming that the Earth is a perfect sphere, so errors up to 0.5% are possible in edge cases.

    client.geoAdd("GeoSet", GeoAddEntry(12.123, -3.321, "Chicago"), GeoAddEntry(-11.4, 3.99, "Prague"))
    client.geoDist("GeoSet", "Chicago", "Prague")
    key

    Name of a sortedSet from which members will be used

    member1

    name present in 'key' set

    member2

    name present in 'key' set

    unit

    Measure unit used in response scredis.protocol.requests.GeoDistUnit

    returns

    distance between two members in a set in specified measure unit or None if any of members not found in a set.

    Definition Classes
    GeoCommands
    Since

    3.2.0

    See also

    https://redis.io/commands/geodist

  54. def geoHash(key: String, members: String*): Future[List[Option[String]]]

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD).

    Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD).

    The command returns 11 characters Geohash strings, so no precision is loss compared to the Redis internal 52 bit representation. The returned Geohashes have the following properties:

    They can be shortened removing characters from the right. It will lose precision but will still point to the same area. It is possible to use them in geohash.org URLs such as http://geohash.org/<geohash-string>. Strings with a similar prefix are nearby, but the contrary is not true, it is possible that strings with different prefixes are nearby too.

    client.geoAdd("GeoSet", GeoAddEntry(1.11, 2.22, "Warsaw"))
    client.geoHash("GeoSet", "Warsaw", "unknownloc")
    key

    Name of a sortedSet from which members will be used

    members

    sequence of name entries present in set.

    returns

    List with calculated geohash corresponding to each present member and None for not found members.

    Definition Classes
    GeoCommands
    Since

    3.2.0

    See also

    https://redis.io/commands/geohash

  55. def geoPos(key: String, members: String*): Future[List[Option[(Double, Double)]]]

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.

    Return the positions (longitude,latitude) of all the specified members of the geospatial index represented by the sorted set at key.

    Given a sorted set representing a geospatial index, populated using the GEOADD command, it is often useful to obtain back the coordinates of specified members. When the geospatial index is populated via GEOADD the coordinates are converted into a 52 bit geohash, so the coordinates returned may not be exactly the ones used in order to add the elements, but small errors may be introduced.

    client.geoAdd("GeoSet", GeoAddEntry(10, 10, "Paris"))
    client.geoPos("GeoSet", "Paris", "Unknown")
    key

    Name of a sortedSet from which members will be used

    members

    sequence of name entries present in set.

    returns

    list where each entry represents coordinates (longitude, latitude) of corresponding member name or None if member is not found.

    Definition Classes
    GeoCommands
    Since

    3.2.0

    See also

    https://redis.io/commands/geopos

  56. def geoRadius(key: String, longitude: Double, latitude: Double, radius: Double, radiusUnit: GeoDistUnit): Future[List[String]]

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    Return the members of a sorted set populated with geospatial information using GEOADD, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius).

    The common use case for this command is to retrieve geospatial items near a specified point not farther than a given amount of meters (or other units). This allows, for example, to suggest mobile users of an application nearby places.

    client.geoAdd("GeoSet", GeoAddEntry(1.111, 1.5, "Tokyo"), GeoAddEntry(1.222, 1.6, "Kyoto"), GeoAddEntry(1.5, 1.333, "Nagasaki"))
    client.geoRadius("GeoSet", 1, 1, 3500, GeoDistUnit.km)
    key

    Name of a sortedSet in which points will be searched.

    longitude

    First coordinate of a point.

    latitude

    Second coordinate of a point.

    radius

    Distance between given point and an edge of a circle. Specified in 'radiusUnit' units.

    radiusUnit

    Units of measure in which radius is expressed scredis.protocol.requests.GeoDistUnit

    returns

    List of member names from 'key' set.

    Definition Classes
    GeoCommands
    Since

    3.2.0

    See also

    https://redis.io/commands/georadius

  57. def geoRadiusByMember(key: String, member: String, radius: Double, radiusUnit: GeoDistUnit): Future[List[String]]

    This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.

    This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set.

    The position of the specified member is used as the center of the query.

    key

    Name of a sortedSet in which points will be searched.

    member

    Name present in 'key' set

    radius

    Radius in which returned elements are found. Specified in 'radiusUnit' units.

    radiusUnit

    Units of measure in which radius is expressed scredis.protocol.requests.GeoDistUnit

    returns

    List of member names from 'key' set.

    Definition Classes
    GeoCommands
    Since

    3.2.0

    Exceptions thrown

    scredis.exceptions.RedisErrorResponseException if member is not found in set.

    Note

    scredis.commands.GeoCommands.geoRadius

    client.geoAdd("GeoSet", GeoAddEntry(1.111, 1.5, "Tokyo"), GeoAddEntry(1.222, 1.6, "Kyoto"), GeoAddEntry(1.5, 1.333, "Nagasaki"))
    client.geoRadiusByMember("GeoSet", "Tokyo", 60000, GeoDistUnit.km)
    See also

    https://redis.io/commands/georadiusbymember

  58. def geoRadiusByMemberComplex(key: String, member: String, radius: Double, radiusUnit: GeoDistUnit, sort: Option[GeoSortOrder] = None, count: Option[Int] = None): Future[List[RadiusResult]]
    Definition Classes
    GeoCommands
  59. def geoRadiusComplex(key: String, longitude: Double, latitude: Double, radius: Double, radiusUnit: GeoDistUnit, sort: Option[GeoSortOrder] = None, count: Option[Int] = None): Future[List[RadiusResult]]
    Definition Classes
    GeoCommands
  60. def get[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Returns the value stored at key.

    Returns the value stored at key.

    key

    the target key

    returns

    value stored at key, or None if the key does not exist

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

  61. def getAuthOpt: Option[AuthConfig]
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  62. def getBit(key: String, offset: Long): Future[Boolean]

    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.

    key

    the target key

    offset

    the position in the string

    returns

    true if the bit is set to 1, false otherwise

    Definition Classes
    StringCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

  63. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  64. def getDatabase: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  65. def getNameOpt: Option[String]
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  66. def getRange[R](key: String, start: Long, stop: Long)(implicit arg0: Reader[R]): Future[R]

    Returns a substring of the string stored at a key.

    Returns a substring of the string stored at a key.

    key

    the target key

    start

    the start offset (inclusive)

    stop

    the stop offset (inclusive)

    returns

    the substring determined by the specified offsets, or the empty string if the key does not exist

    Definition Classes
    StringCommands
    Since

    2.4.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

    Note

    Both offsets are inclusive, i.e. [start, stop]. The function handles out of range requests by limiting the resulting range to the actual length of the string.

  67. def getSet[R, W](key: String, value: W)(implicit arg0: Reader[R], arg1: Writer[W]): Future[Option[R]]

    Sets the string value of a key and return its old value.

    Sets the string value of a key and return its old value.

    key

    the target key

    value

    the value to set key to

    returns

    the old value, or None if the latter did not exist

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type string

  68. def hDel(key: String, fields: String*): Future[Long]

    Deletes one or more hash fields.

    Deletes one or more hash fields.

    key

    key of the hash

    fields

    field(s) to be deleted from hash

    returns

    the number of fields that were removed from the hash, not including specified but non existing fields

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

    Note

    Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0. Redis versions older than 2.4 can only remove a field per call.

  69. def hExists(key: String, field: String): Future[Boolean]

    Determines if a hash field exists.

    Determines if a hash field exists.

    key

    hash key

    field

    name of the field

    returns

    true if the hash contains field, false if the hash does not contain it or the key does not exists

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  70. def hGet[R](key: String, field: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Returns the value of a hash field.

    Returns the value of a hash field.

    key

    hash key

    field

    field name to retrieve

    returns

    the value associated with field name, or None when field is not present in the hash or key does not exist

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  71. def hGetAll[R](key: String)(implicit arg0: Reader[R]): Future[Option[Map[String, R]]]

    Returns all the fields and values in a hash.

    Returns all the fields and values in a hash.

    key

    hash key

    returns

    key-value pairs stored in hash with key, or None when hash is empty or key does not exist

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  72. def hIncrBy(key: String, field: String, count: Long): Future[Long]

    Increments the integer value of a hash field by the given number.

    Increments the integer value of a hash field by the given number.

    key

    hash key

    field

    field name to increment

    count

    increment

    returns

    the value at field after the increment operation

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the field does not hold an integer value or if the value stored at key is not of type hash

    Note

    If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.

  73. def hIncrByFloat(key: String, field: String, count: Double): Future[Double]

    Increments the float value of a hash field by the given amount.

    Increments the float value of a hash field by the given amount.

    key

    hash key

    field

    field name to increment

    count

    increment

    returns

    the value at field after the increment operation

    Definition Classes
    HashCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the field does not hold a floating point value or if the value stored at key is not of type hash

    Note

    If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.

  74. def hKeys(key: String): Future[Set[String]]

    Returns all the fields in a hash.

    Returns all the fields in a hash.

    key

    hash key

    returns

    set of field names or the empty set if the hash is empty or the key does not exist

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  75. def hLen(key: String): Future[Long]

    Returns the number of fields contained in the hash stored at key.

    Returns the number of fields contained in the hash stored at key.

    key

    hash key

    returns

    number of fields in the hash, or 0 if the key does not exist

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  76. def hScan[R](key: String, cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None)(implicit arg0: Reader[R]): Future[(Long, List[(String, R)])]

    Incrementally iterates through the fields of a hash.

    Incrementally iterates through the fields of a hash.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the list of fields (key-value pairs) as its second element

    Definition Classes
    HashCommands
    Since

    2.8.0

  77. def hSet[W](key: String, field: String, value: W)(implicit arg0: Writer[W]): Future[Boolean]

    Sets the string value of a hash field.

    Sets the string value of a hash field.

    key

    hash key

    field

    field name to set

    value

    value to set

    returns

    true if field is a new field in the hash and value was set, false if field already exists and the value was updated

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

    Note

    If the field already exists in the hash, it is overwritten.

  78. def hSetNX[W](key: String, field: String, value: W)(implicit arg0: Writer[W]): Future[Boolean]

    Sets the value of a hash field, only if the field does not exist.

    Sets the value of a hash field, only if the field does not exist.

    key

    hash key

    field

    field name to set

    value

    value to set

    returns

    true if field is a new field in the hash and value was set, false if field already exists and no operation was performed

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  79. def hStrlen(key: String, field: String): Future[Long]

    Returns the length of the value associated with field in the hash stored at key.

    Returns the length of the value associated with field in the hash stored at key. For numbers it is a count of their digits (+1 if number is negative) For booleans it is true=4 and false=5 For strings it is number of bytes they occupy. ONLY if you don't use utf characters it will be their length. If the key or the field do not exist, 0 is returned.

    key

    hash key

    field

    field name to set

    returns

    the string length of the value associated with field, or zero when field is not present in the hash or key does not exist at all.

    Definition Classes
    HashCommands
  80. def hVals[R](key: String)(implicit arg0: Reader[R]): Future[List[R]]

    Returns all the values in a hash.

    Returns all the values in a hash.

    key

    hash key

    returns

    list of values, or the empty list if hash is empty or key does not exist

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

  81. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  82. def hmGet[R](key: String, fields: String*)(implicit arg0: Reader[R]): Future[List[Option[R]]]

    Returns the values associated to the specified hash fields.

    Returns the values associated to the specified hash fields.

    key

    hash key

    fields

    field(s) to retrieve

    returns

    list of value(s) associated to the specified field name(s)

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

    Note

    For every field that does not exist, None is returned.

  83. def hmGetAsMap[R](key: String, fields: String*)(implicit arg0: Reader[R]): Future[Map[String, R]]

    Returns a Map containing field-value pairs associated to the specified hash fields.

    Returns a Map containing field-value pairs associated to the specified hash fields.

    key

    hash key

    fields

    field(s) to retrieve

    returns

    field-value pairs associated to the specified field name(s)

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

    Note

    Every non-existent field gets removed from the resulting Map.

  84. def hmSet[W](key: String, fieldValuePairs: Map[String, W])(implicit arg0: Writer[W]): Future[Unit]

    Sets multiple hash fields to multiple values.

    Sets multiple hash fields to multiple values.

    key

    hash key

    fieldValuePairs

    field-value pair(s) to be set

    Definition Classes
    HashCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value stored at key is not of type hash

    Note

    This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created

  85. val host: String
    Definition Classes
    AbstractAkkaConnection
  86. def inTransaction(build: (TransactionBuilder) => Any): Future[Vector[Try[Any]]]

    Executes a transaction and returns the results of all queued commands.

    Executes a transaction and returns the results of all queued commands.

    build

    the transaction block

    returns

    vector containing the results of all queued commands or failed future with IllegalArgumentException when operations count exceeds semaphore limit defined in configuration

    Definition Classes
    TransactionCommands
    Since

    1.2.0

  87. def incr(key: String): Future[Long]

    Increments the integer value of a key by one.

    Increments the integer value of a key by one.

    key

    the key to increment

    returns

    the value of key after the increment

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type or contains a string that cannot be represented as integer

    Note

    If the key does not exist, it is set to 0 before performing the operation.

  88. def incrBy(key: String, increment: Long): Future[Long]

    Increments the integer value of a key by the given amount.

    Increments the integer value of a key by the given amount.

    key

    the key to increment

    increment

    the increment

    returns

    the value of key after the decrement

    Definition Classes
    StringCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type or contains a string that cannot be represented as integer

    Note

    If the key does not exist, it is set to 0 before performing the operation.

  89. def incrByFloat(key: String, increment: Double): Future[Double]

    Increment the float value of a key by the given amount.

    Increment the float value of a key by the given amount.

    key

    the key to increment

    increment

    the increment

    returns

    the value of key after the decrement

    Definition Classes
    StringCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type, the current key content or the specified increment are not parseable as a double precision floating point number

    Note

    If the key does not exist, it is set to 0 before performing the operation.

  90. def info(section: String = "default"): Future[Map[String, String]]

    Gets information and statistics about the server.

    Gets information and statistics about the server.

    section

    name of the section for which data should be retrieved

    returns

    map of field -> value pairs that match the specified section, or an empty map if the section does not exist

    Definition Classes
    ServerCommands
    Since

    1.0.0

    Note

    The section can additionally take the following values: all and default.

  91. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  92. var isShuttingDown: Boolean
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  93. def isTerminated: Boolean
    Definition Classes
    AbstractAkkaConnection
  94. def keys(pattern: String): Future[Set[String]]

    Finds all keys matching the given pattern.

    Finds all keys matching the given pattern.

    pattern

    pattern to search for

    returns

    the matched keys, or the empty set if no keys match the given pattern

    Definition Classes
    KeyCommands
    Since

    1.0.0

  95. def lIndex[R](key: String, index: Long)(implicit arg0: Reader[R]): Future[Option[R]]

    Returns an element from a list by its index.

    Returns an element from a list by its index.

    key

    list key

    index

    zero-based position in the list

    returns

    the requested element, or None when index is out of range

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    The index is zero-based, so 0 means the first element, 1 the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here, -1 means the last element, -2 means the penultimate and so forth.

  96. def lInsert[W1, W2](key: String, position: Position, pivot: W1, value: W2)(implicit arg0: Writer[W1], arg1: Writer[W2]): Future[Option[Long]]

    Inserts an element before or after another element in a list.

    Inserts an element before or after another element in a list.

    key

    list key

    position

    tell if a new value should be placed after of before pivot

    pivot

    value after/before which the element should be inserted

    value

    element to be inserted

    returns

    the length of the list after the insert operation, or None if the index is out of range

    Definition Classes
    ListCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  97. def lLen(key: String): Future[Long]

    Returns the length of a list.

    Returns the length of a list.

    key

    list key

    returns

    the length of the list at key, or 0 if the key does not exist

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  98. def lPop[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Removes and returns the first element of a list.

    Removes and returns the first element of a list.

    key

    list key

    returns

    the popped element, or None if the key does not exist

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  99. def lPush[W](key: String, values: W*)(implicit arg0: Writer[W]): Future[Long]

    Prepends one or multiple values to a list.

    Prepends one or multiple values to a list.

    key

    list key

    values

    value(s) to prepend

    returns

    the length of the list after the push operations

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    If key does not exist, it is created as empty list before performing the push operation. Redis versions older than 2.4 can only push one value per call.

  100. def lPushX[W](key: String, value: W)(implicit arg0: Writer[W]): Future[Long]

    Prepends a value to a list, only if the list exists.

    Prepends a value to a list, only if the list exists.

    key

    list key

    value

    value to prepend

    returns

    the length of the list after the push operation

    Definition Classes
    ListCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  101. def lRange[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[List[R]]

    Returns a range of elements from a list.

    Returns a range of elements from a list.

    key

    list key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    list of elements in the specified range, or the empty list if there are no such elements or the key does not exist

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    The offsets start and end are zero-based indexes, with 0 being the first element of the list (the head of the list), 1 being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list. For example, -1 is the last element of the list, -2 the penultimate, and so on. Both offsets are inclusive, i.e. LRANGE key 0 10 will return 11 elements (if they exist).

  102. def lRem[W](key: String, value: W, count: Int = 0)(implicit arg0: Writer[W]): Future[Long]

    Removes the first count occurrences of elements equal to value from the list stored at key.

    Removes the first count occurrences of elements equal to value from the list stored at key.

    key

    list key

    value

    value to be removed from the list

    count

    indicates the number of found values that should be removed, see above note

    returns

    the number of removed elements

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    The count argument influences the operation in the following ways:

    count > 0: Remove elements equal to value moving from head to tail.
    count < 0: Remove elements equal to value moving from tail to head.
    count = 0: Remove all elements equal to value.
  103. def lSet[W](key: String, index: Long, value: W)(implicit arg0: Writer[W]): Future[Unit]

    Sets the value of an element in a list by its index.

    Sets the value of an element in a list by its index.

    key

    list key

    index

    position of the element to set

    value

    value to be set at index

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if index is out of range or if key contains a non-list value

  104. def lTrim(key: String, start: Long, stop: Long): Future[Unit]

    Trims a list to the specified range.

    Trims a list to the specified range.

    key

    list key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    Out of range indexes will not produce an error: if start is larger than the end of the list, or start > end, the result will be an empty list (which causes key to be removed). If end is larger than the end of the list, Redis will treat it like the last element of the list.

  105. def lastSave(): Future[Long]

    Gets the UNIX timestamp of the last successful save to disk.

    Gets the UNIX timestamp of the last successful save to disk.

    returns

    UNIX timestamp

    Definition Classes
    ServerCommands
    Since

    1.0.0

  106. val listenerActor: ActorRef
    Attributes
    protected
    Definition Classes
    AkkaNonBlockingConnectionAbstractAkkaConnection
  107. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
    Annotations
    @transient()
  108. def mGet[R](keys: String*)(implicit arg0: Reader[R]): Future[List[Option[R]]]

    Returns the values of all specified keys.

    Returns the values of all specified keys.

    keys

    the keys to fetch

    returns

    list of value(s) stored at the specified key(s)

    Definition Classes
    StringCommands
    Since

    1.0.0

    Note

    For every key that does not hold a string value or does not exist, None is returned. Because of this, the operation never fails.

  109. def mGetAsMap[R](keys: String*)(implicit arg0: Reader[R]): Future[Map[String, R]]

    Returns a Map containing the specified key(s) paired to their respective value(s).

    Returns a Map containing the specified key(s) paired to their respective value(s).

    keys

    the keys to fetch

    returns

    map of key-value pairs

    Definition Classes
    StringCommands
    Since

    1.0.0

    Note

    Every key that does not hold a string value or does not exist will be removed from the resulting Map.

  110. def mSet[W](keyValuePairs: Map[String, W])(implicit arg0: Writer[W]): Future[Unit]

    Atomically sets multiple keys to multiple values.

    Atomically sets multiple keys to multiple values.

    keyValuePairs

    map of key-value pairs to set

    Definition Classes
    StringCommands
    Since

    1.0.1

    Note

    MSET replaces existing values with new values, just as regular SET.

  111. def mSetNX[W](keyValuePairs: Map[String, W])(implicit arg0: Writer[W]): Future[Boolean]

    Atomically sets multiple keys to multiple values, only if none of the keys exist.

    Atomically sets multiple keys to multiple values, only if none of the keys exist.

    keyValuePairs

    map of key-value pairs to set

    returns

    true if all the keys were set, false if at least one key already existed and thus no operation was performed.

    Definition Classes
    StringCommands
    Since

    1.0.1

    Note

    MSETNX will not perform any operation at all even if just a single key already exists.

  112. val maxWriteBatchSize: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  113. def migrate(key: String, host: String, port: Int = 6379, database: Int = 0, authOpt: Option[AuthConfig] = None, timeout: FiniteDuration = 2.seconds, copy: Boolean = false, replace: Boolean = false): Future[Unit]

    Atomically transfers a key from a Redis instance to another one.

    Atomically transfers a key from a Redis instance to another one.

    key

    key to transfer

    host

    destination host

    port

    destination port

    database

    destination database

    authOpt

    destination server authorization credentials

    timeout

    timeout duration, up to milliseconds precision

    copy

    if true, do not remove the key from the local instance

    replace

    if true, replace existing key on the remote instance

    Definition Classes
    KeyCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if an error occurs

  114. def move(key: String, database: Int): Future[Boolean]

    Moves a key to another database.

    Moves a key to another database.

    key

    key to move

    database

    destination database

    returns

    true if key was moved, false otherwise

    Definition Classes
    KeyCommands
    Since

    1.0.0

  115. var nameOpt: Option[String]
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  116. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  117. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  118. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  119. def objectEncoding(key: String): Future[Option[String]]

    Returns the kind of internal representation used in order to store the value associated with a key.

    Returns the kind of internal representation used in order to store the value associated with a key.

    key

    the key

    returns

    the object encoding or None if the key does not exist

    Definition Classes
    KeyCommands
    Since

    2.2.3

    Note

    Objects can be encoded in different ways: Strings can be encoded as raw or int Lists can be encoded as ziplist or linkedlist Sets can be encoded as intset or hashtable Hashes can be encoded as zipmap or hashtable SortedSets can be encoded as ziplist or skiplist

  120. def objectIdleTime(key: String): Future[Option[Long]]

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

    key

    the key

    returns

    the number of seconds since the object is idle or None if the key does not exist

    Definition Classes
    KeyCommands
    Since

    2.2.3

    Note

    While the value is returned in seconds the actual resolution of this timer is 10 seconds, but may vary in future implementations.

  121. def objectRefCount(key: String): Future[Option[Long]]

    Returns the number of references of the value associated with the specified key.

    Returns the number of references of the value associated with the specified key.

    key

    the key

    returns

    the number of references or None if the key does not exist

    Definition Classes
    KeyCommands
    Since

    2.2.3

  122. def pExpire(key: String, ttlMillis: Long): Future[Boolean]

    Sets a key's time to live in milliseconds.

    Sets a key's time to live in milliseconds.

    key

    key to expire

    ttlMillis

    time-to-live in milliseconds

    returns

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

    Definition Classes
    KeyCommands
    Since

    2.6.0

  123. def pExpireAt(key: String, timestampMillis: Long): Future[Boolean]

    Sets the expiration for a key as a UNIX timestamp specified in milliseconds.

    Sets the expiration for a key as a UNIX timestamp specified in milliseconds.

    key

    key to expire

    timestampMillis

    UNIX milliseconds-timestamp at which the key should expire

    returns

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

    Definition Classes
    KeyCommands
    Since

    2.6.0

  124. def pSetEX[W](key: String, value: W, ttlMillis: Long)(implicit arg0: Writer[W]): Future[Unit]

    Sets the value and expiration in milliseconds of a key.

    Sets the value and expiration in milliseconds of a key.

    key

    target key to set

    value

    value to be stored at key

    ttlMillis

    time-to-live in milliseconds

    Definition Classes
    StringCommands
    Since

    2.6.0

    Note

    If key already holds a value, it is overwritten, regardless of its type.

  125. def pTtl(key: String): Future[Either[Boolean, Long]]

    Gets the time to live for a key in milliseconds.

    Gets the time to live for a key in milliseconds.

    result match {
      case Left(false) => // key does not exist
      case Left(true) => // key exists but has no associated expire
      case Right(ttl) =>
    }
    key

    the target key

    returns

    Right(ttl) where ttl is the time-to-live in milliseconds for specified key, Left(false) if key does not exist or Left(true) if key exists but has no associated expire

    Definition Classes
    KeyCommands
    Since

    2.6.0

    Note

    For Redis version <= 2.8.x, Left(false) will be returned when the key does not exists and when it exists but has no associated expire (Redis returns the same error code for both cases). In other words, you can simply check the following

    result match {
      case Left(_) =>
      case Right(ttl) =>
    }
  126. def persist(key: String): Future[Boolean]

    Removes the expiration from a key.

    Removes the expiration from a key.

    key

    key to persist

    returns

    true if key was persisted, false if key does not exist or does not have an associated timeout

    Definition Classes
    KeyCommands
    Since

    2.2.0

  127. def pfAdd[W](key: String, elements: W*)(implicit arg0: Writer[W]): Future[Boolean]

    Adds all the element arguments to the HyperLogLog data structure stored at specified key.

    Adds all the element arguments to the HyperLogLog data structure stored at specified key.

    key

    the key of the HyperLogLog data structure

    elements

    element(s) to add to the HyperLogLog data structure

    returns

    true if at least one HyperLogLog internal register was altered, false otherwise

    Definition Classes
    HyperLogLogCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key is not of HyperLogLog type

    Note

    The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.

  128. def pfCount(keys: String*): Future[Long]

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.

    When called with multiple keys, returns the approximated cardinality of the union of the HyperLogLogs passed, by internally merging the HyperLogLogs stored at the provided keys into a temporary HyperLogLog.

    keys

    key(s) of the HyperLogLog data structure to count

    returns

    the approximate number of unique elements observed via PFADD

    Definition Classes
    HyperLogLogCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if at least one key is not of HyperLogLog type

    Note

    The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.

  129. def pfMerge(destKey: String, keys: String*): Future[Unit]

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.

    The computed merged HyperLogLog is set to the destination variable, which is created if does not exist (defauling to an empty HyperLogLog).

    destKey

    the destination key where the result should be stored

    keys

    keys of the HyperLogLog data structure to merge

    Definition Classes
    HyperLogLogCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if at least one key is not of HyperLogLog type

    Note

    The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.

  130. def ping(): Future[String]

    Pings the server.

    Pings the server. This command is often used to test if a connection is still alive, or to measure latency.

    returns

    PONG

    Definition Classes
    ConnectionCommands
    Since

    1.0.0

  131. val port: Int
    Definition Classes
    AbstractAkkaConnection
  132. def pubSubChannels(patternOpt: Option[String] = None): Future[List[String]]

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

    patternOpt

    optional pattern to filter returned channels

    returns

    the currently active channels, optionally matching the specified pattern

    Definition Classes
    PubSubCommands
    Since

    2.8.0

    Note

    If no pattern is specified, all the channels are listed, otherwise if pattern is specified only channels matching the specified glob-style pattern are listed.

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

    returns

    the number of subscriptions to patterns

    Definition Classes
    PubSubCommands
    Since

    2.8.0

    Note

    Note that this is not just the count of clients subscribed to patterns but the total number of patterns all the clients are subscribed to.

  134. def pubSubNumSub(channels: String*): Future[Map[String, 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.

    channels

    channel name(s)

    returns

    a map of channels to number of subscribers for every provided channel

    Definition Classes
    PubSubCommands
    Since

    2.8.0

  135. def publish[W](channel: String, message: W)(implicit arg0: Writer[W]): Future[Long]

    Publishes a message to a channel.

    Publishes a message to a channel.

    channel

    the name of the channel

    message

    the message payload

    returns

    the number of clients that received the message

    Definition Classes
    PubSubCommands
    Since

    2.0.0

  136. def quit(): Future[Unit]

    Closes the connection.

    Closes the connection.

    Definition Classes
    ConnectionCommands
    Since

    1.0.0

  137. def rPop[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Removes and returns the last element of a list.

    Removes and returns the last element of a list.

    key

    list key

    returns

    the popped element, or None if the key does not exist

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  138. def rPopLPush[R](sourceKey: String, destKey: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Removes the last element in a list, appends it to another list and returns it.

    Removes the last element in a list, appends it to another list and returns it.

    sourceKey

    key of list to be pop from

    destKey

    key of list to be push to

    returns

    the popped element, or None if the key does not exist

    Definition Classes
    ListCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  139. def rPush[W](key: String, values: W*)(implicit arg0: Writer[W]): Future[Long]

    Appends one or multiple values to a list.

    Appends one or multiple values to a list.

    key

    list key

    values

    value(s) to prepend

    returns

    the length of the list after the push operations

    Definition Classes
    ListCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

    Note

    If key does not exist, it is created as empty list before performing the push operation. Redis versions older than 2.4 can only push one value per call.

  140. def rPushX[W](key: String, value: W)(implicit arg0: Writer[W]): Future[Long]

    Appends a value to a list, only if the list exists.

    Appends a value to a list, only if the list exists.

    key

    list key

    value

    value to prepend

    returns

    the length of the list after the push operation

    Definition Classes
    ListCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a non-list value

  141. def randomKey(): Future[Option[String]]

    Returns a random key from the keyspace.

    Returns a random key from the keyspace.

    returns

    the random key or None when the database is empty associated timeout

    Definition Classes
    KeyCommands
    Since

    1.0.0

  142. val receiveTimeoutOpt: Option[FiniteDuration]
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  143. def rename(key: String, newKey: String): Future[Unit]

    Renames a key.

    Renames a key.

    key

    source key

    newKey

    destination key

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the source and destination keys are the same, or when key does not exist

    Note

    if newKey already exists, it is overwritten

  144. def renameNX(key: String, newKey: String): Future[Boolean]

    Renames a key, only if the new key does not exist.

    Renames a key, only if the new key does not exist.

    key

    source key

    newKey

    destination key

    returns

    true if key was renamed to newKey, false if newKey already exists

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the source and destination keys are the same, or when key does not exist

  145. def restore[W](key: String, serializedValue: W, ttlOpt: Option[FiniteDuration] = None)(implicit arg0: Writer[W]): Future[Unit]

    Creates a key using the provided serialized value, previously obtained using DUMP.

    Creates a key using the provided serialized value, previously obtained using DUMP.

    key

    destination key

    serializedValue

    serialized value, previously obtained using DUMP

    ttlOpt

    optional time-to-live duration of newly created key (expire)

    Definition Classes
    KeyCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the value could not be restored

  146. def role(): Future[Role]

    Provides information on the role of a Redis instance in the context of replication, by returning if the instance is currently a master, slave, or sentinel.

    Provides information on the role of a Redis instance in the context of replication, by returning if the instance is currently a master, slave, or sentinel.

    returns

    the scredis.Role of the Redis instance

    Definition Classes
    ServerCommands
    Since

    2.8.12

    Note

    The command also returns additional information about the state of the replication (if the role is master or slave) or the list of monitored master names (if the role is sentinel).

  147. def sAdd[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Adds one or more members to a set.

    Adds one or more members to a set.

    key

    set key

    members

    member(s) to add

    returns

    the number of members added to the set, not including all the members that were already present

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  148. def sCard(key: String): Future[Long]

    Returns the number of members in a set.

    Returns the number of members in a set.

    key

    set key

    returns

    the cardinality (number of members) of the set, or 0 if key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  149. def sDiff[R](key: String, keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns the set resulting from the difference between the first set and all the successive sets.

    Returns the set resulting from the difference between the first set and all the successive sets.

    key

    the key of the first set

    keys

    key(s) of successive set(s) whose members will be substracted from the first one

    returns

    the resulting set, or the empty set if the first key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  150. def sDiffStore(destKey: String, key: String, keys: String*): Future[Long]

    Stores the set resulting from the difference between the first set and all the successive sets.

    Stores the set resulting from the difference between the first set and all the successive sets.

    destKey

    key where to store the resulting set

    key

    key of first set

    keys

    keys of sets to be substracted from first set, if empty, first set is simply copied to destKey

    returns

    the cardinality of the resulting set

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  151. def sInter[R](keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Intersects multiple sets.

    Intersects multiple sets.

    keys

    keys of sets to be intersected together

    returns

    the resulting set, or the empty set if the first key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  152. def sInterStore(destKey: String, keys: String*): Future[Long]

    Intersects multiple sets and stores the resulting set in a key.

    Intersects multiple sets and stores the resulting set in a key.

    destKey

    key where to store the resulting set

    keys

    keys of sets to be intersected together, if only one is specified, it is simply copied to destKey

    returns

    the cardinality of the resulting set

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  153. def sIsMember[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Boolean]

    Determines if a given value is a member of a set.

    Determines if a given value is a member of a set.

    key

    set key

    member

    value to be tested

    returns

    true if the provided value is a member of the set stored at key, false otherwise

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  154. def sMembers[R](key: String)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns all the members of a set.

    Returns all the members of a set.

    key

    set key

    returns

    set stored at key, or the empty set if key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  155. def sMove[W](sourceKey: String, destKey: String, member: W)(implicit arg0: Writer[W]): Future[Boolean]

    Moves a member from one set to another.

    Moves a member from one set to another.

    sourceKey

    key of source set

    member

    value to be moved from source set to destination set

    returns

    true if the member was moved, false if the element is not a member of source set and no operation was performed

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if sourceKey or destKey contains a value that is not a set

  156. def sPop[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Removes and returns a random member from a set.

    Removes and returns a random member from a set.

    key

    set key

    returns

    random member, or None if key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.

  157. def sPopCount[R](key: String, count: Int)(implicit arg0: Reader[R]): Future[List[R]]

    Removes and returns a random 'count' members from a set.

    Removes and returns a random 'count' members from a set.

    key

    set key

    count

    maximum number of returned elements

    returns

    list of random members which size is less or equal to 'count'

    Definition Classes
    SetCommands
    Since

    3.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.

    See also

    https://redis.io/commands/spop

  158. def sRandMember[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Returns a random member from a set (without removing it).

    Returns a random member from a set (without removing it).

    key

    set key

    returns

    random member, or None if key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  159. def sRandMembers[R](key: String, count: Int = 1)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns a random member from a set (without removing it).

    Returns a random member from a set (without removing it).

    key

    set key

    count

    number of member to randomly retrieve

    returns

    set of random members, or the empty set if key does not exist

    Definition Classes
    SetCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  160. def sRem[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Removes one or more members from a set.

    Removes one or more members from a set.

    key

    set key

    members

    members to remove from set

    returns

    the number of members that were removed from the set, not including non-existing members

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    Redis versions older than 2.4 can only remove one member per call.

  161. def sScan[R](key: String, cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None)(implicit arg0: Reader[R]): Future[(Long, Set[R])]

    Incrementally iterates the elements of a set.

    Incrementally iterates the elements of a set.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the set of elements as its second element

    Definition Classes
    SetCommands
    Since

    2.8.0

  162. def sUnion[R](keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Computes the union of multiple sets.

    Computes the union of multiple sets.

    keys

    keys of sets to be included in the union computation

    returns

    the resulting set, or the empty set if the first key does not exist

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  163. def sUnionStore(destKey: String, keys: String*): Future[Long]

    Computes the union of multiple sets and stores the resulting set in a key.

    Computes the union of multiple sets and stores the resulting set in a key.

    destKey

    key where to store the resulting set

    keys

    keys of sets to be included in the union computation, if only one is specified, it is simply copied to destKey

    returns

    the cardinality of the resulting set

    Definition Classes
    SetCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  164. def save(): Future[Unit]

    Synchronously saves the dataset to disk.

    Synchronously saves the dataset to disk.

    Definition Classes
    ServerCommands
    Since

    1.0.0

  165. def scan(cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None): Future[(Long, Set[String])]

    Incrementally iterates the set of keys in the currently selected Redis database.

    Incrementally iterates the set of keys in the currently selected Redis database.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the set of keys as its second element

    Definition Classes
    KeyCommands
    Since

    2.8.0

  166. def scriptExists(sha1s: String*): Future[Map[String, Boolean]]

    Checks existence of scripts in the script cache.

    Checks existence of scripts in the script cache.

    sha1s

    SHA1 digest(s) to check for existence

    returns

    SHA1 -> Boolean Map where true means the script associated to the sha1 exists in the cache

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

  167. def scriptFlush(): Future[Unit]

    Removes all the scripts from the script cache.

    Removes all the scripts from the script cache.

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

  168. def scriptKill(): Future[Unit]

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    Kills the currently executing Lua script, assuming no write operation was yet performed by the script.

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

    Note

    If the script already performed write operations it can not be killed in this way because it would violate Lua script atomicity contract. In such a case only SHUTDOWN NOSAVE is able to kill the script, killing the Redis process in an hard way preventing it to persist with half-written information.

  169. def scriptLoad(script: String): Future[String]

    Loads or stores the specified Lua script into the script cache.

    Loads or stores the specified Lua script into the script cache.

    script

    the script to be loaded into the cache

    returns

    the SHA1 digest of the stored script

    Definition Classes
    ScriptingCommands
    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if a compilation error occurs

    Note

    The script is guaranteed to stay in the script cache forever (unless SCRIPT FLUSH is called).

  170. def select(database: Int): Future[Unit]

    Changes the selected database on the current connection.

    Changes the selected database on the current connection.

    database

    database index

    Definition Classes
    ConnectionCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the database index is invalid

  171. def send(transaction: Transaction): Future[Vector[Try[Any]]]
    Attributes
    protected[scredis]
    Definition Classes
    AkkaNonBlockingConnectionTransactionEnabledConnection
  172. def send[A](request: Request[A]): Future[A]
    Attributes
    protected[scredis]
    Definition Classes
    AkkaNonBlockingConnectionNonBlockingConnection
  173. def set[W](key: String, value: W, ttlOpt: Option[FiniteDuration] = None, conditionOpt: Option[Condition] = None)(implicit arg0: Writer[W]): Future[Boolean]

    Sets the string value of a key.

    Sets the string value of a key.

    key

    target key to set

    value

    value to be stored at key

    ttlOpt

    optional time-to-live (up to milliseconds precision)

    conditionOpt

    optional condition to be met for the value to be set

    returns

    true if the value was set correctly, false if a condition was specified but not met

    Definition Classes
    StringCommands
    Since

    1.0.0

    Note

    If key already holds a value, it is overwritten, regardless of its type. Any previous time to live associated with the key is discarded on successful SET operation. The ttlOpt and conditionOpt parameters can only be used with Redis >= 2.6.12

  174. def setBit(key: String, offset: Long, bit: Boolean): Future[Boolean]

    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.

    key

    key for which the bit should be set

    offset

    position where the bit should be set

    bit

    true sets the bit to 1, false sets it to 0

    Definition Classes
    StringCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type

    Note

    When key does not exist, a new string value is created. The string is grown to make sure it can hold a bit at offset. When the string at key is grown, added bits are set to 0.

  175. def setEX[W](key: String, value: W, ttlSeconds: Int)(implicit arg0: Writer[W]): Future[Unit]

    Sets the value and expiration in seconds of a key.

    Sets the value and expiration in seconds of a key.

    key

    target key to set

    value

    value to be stored at key

    ttlSeconds

    time-to-live in seconds

    Definition Classes
    StringCommands
    Since

    2.0.0

    Note

    If key already holds a value, it is overwritten, regardless of its type.

  176. def setNX[W](key: String, value: W)(implicit arg0: Writer[W]): Future[Boolean]

    Sets the value of a key, only if the key does not exist.

    Sets the value of a key, only if the key does not exist.

    key

    target key to set

    value

    value to be stored at key

    returns

    true if the key was set, false otherwise

    Definition Classes
    StringCommands
    Since

    1.0.0

  177. def setRange[W](key: String, offset: Long, value: W)(implicit arg0: Writer[W]): Future[Long]

    Overwrites part of a string at key starting at the specified offset.

    Overwrites part of a string at key starting at the specified offset.

    key

    target key

    offset

    position from which the string must be overwritten

    value

    string value to be set at given offset

    returns

    the length of the string after it was modified by the command

    Definition Classes
    StringCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type

    Note

    If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset.

  178. def shutdown(modifierOpt: Option[ShutdownModifier] = None): Future[Unit]

    Gracefully shuts down a Redis server.

    Gracefully shuts down a Redis server.

    modifierOpt

    optional scredis.ShutdownModifier

    Definition Classes
    ServerCommands
    Since

    1.0.0

    Note

    The command performs the following operations: - Stops all the clients - Performs a blocking SAVE if at least one save point is configured - Flushes the Append Only File if AOF is enabled - Quits the server

  179. def slaveOf(host: String, port: Int): Future[Unit]

    Configures the current Redis instance as a slave of another Redis instance.

    Configures the current Redis instance as a slave of another Redis instance.

    host

    the host of the master instance

    port

    the port of the master instance

    Definition Classes
    ServerCommands
    Since

    1.0.0

  180. def slaveOfNoOne(): Future[Unit]

    Breaks the replication of a slave instance, turning it back into a master instance.

    Breaks the replication of a slave instance, turning it back into a master instance.

    Definition Classes
    ServerCommands
    Since

    1.0.0

  181. def slowLogGet(countOpt: Option[Int] = None): Future[List[SlowLogEntry]]

    Retieves entries from the slowlog.

    Retieves entries from the slowlog.

    countOpt

    optionally limits the number of retrieved entries

    returns

    list of slowlog entries

    Definition Classes
    ServerCommands
    Since

    2.2.12

  182. def slowLogLen(): Future[Long]

    Returns the number of entries in the slowlog.

    Returns the number of entries in the slowlog.

    returns

    number of entries in the slowlog

    Definition Classes
    ServerCommands
    Since

    2.2.12

  183. def slowLogReset(): Future[Unit]

    Resets the slowlog.

    Resets the slowlog.

    Definition Classes
    ServerCommands
    Since

    2.2.12

  184. def sort[R](key: String, byOpt: Option[String] = None, limitOpt: Option[(Long, Long)] = None, get: Iterable[String] = Nil, desc: Boolean = false, alpha: Boolean = false)(implicit arg0: Reader[R]): Future[List[Option[R]]]

    Sorts the elements of a list, set or sorted set.

    Sorts the elements of a list, set or sorted set.

    key

    key of list, set or sorted set to be sorted

    byOpt

    optional pattern for sorting by external values, can also be "nosort" if the sorting operation should be skipped (useful when only sorting to retrieve objects with get). The * gets replaced by the values of the elements in the collection

    limitOpt

    optional pair of numbers (offset, count) where offset specified the number of elements to skip and count specifies the number of elements to return starting from offset

    get

    list of patterns for retrieving objects stored in external keys. The * gets replaced by the values of the elements in the collection

    desc

    indicates whether elements should be sorted descendingly

    alpha

    indicates whether elements should be sorted lexicographically

    returns

    the sorted list of elements, or the empty list if the key does not exist

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] whenever an error occurs

  185. def sortAndStore(key: String, targetKey: String, byOpt: Option[String] = None, limitOpt: Option[(Long, Long)] = None, get: Iterable[String] = Nil, desc: Boolean = false, alpha: Boolean = false): Future[Long]

    Sorts the elements of a list, set or sorted set and then store the result.

    Sorts the elements of a list, set or sorted set and then store the result.

    key

    key of list, set or sorted set to be sorted

    targetKey

    key of list, set or sorted set to be sorted

    byOpt

    optional pattern for sorting by external values, can also be "nosort" if the sorting operation should be skipped (useful when only sorting to retrieve objects with get). The * gets replaced by the values of the elements in the collection

    limitOpt

    optional pair of numbers (offset, count) where offset specified the number of elements to skip and count specifies the number of elements to return starting from offset

    get

    list of patterns for retrieving objects stored in external keys. The * gets replaced by the values of the elements in the collection

    desc

    indicates whether elements should be sorted descendingly

    alpha

    indicates whether elements should be sorted lexicographically

    returns

    the number of elements in the newly stored sorted collection

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] whenever an error occurs

  186. def strLen(key: String): Future[Long]

    Returns the length of the string value stored in a key.

    Returns the length of the string value stored in a key.

    key

    target key

    returns

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

    Definition Classes
    StringCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if the key contains a value of the wrong type

  187. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  188. val system: ActorSystem
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  189. val tcpReceiveBufferSizeHint: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  190. val tcpSendBufferSizeHint: Int
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  191. def time(): Future[(Long, Long)]

    Returns the current server time.

    Returns the current server time.

    returns

    pair of longs containing (1) UNIX timestamp and (2) microseconds

    Definition Classes
    ServerCommands
    Since

    2.6.0

  192. def toString(): String
    Definition Classes
    AnyRef → Any
  193. def ttl(key: String): Future[Either[Boolean, Int]]

    Gets the time to live for a key in seconds.

    Gets the time to live for a key in seconds.

    result match {
      case Left(false) => // key does not exist
      case Left(true) => // key exists but has no associated expire
      case Right(ttl) =>
    }
    key

    the target key

    returns

    Right(ttl) where ttl is the time-to-live in seconds for specified key, Left(false) if key does not exist or Left(true) if key exists but has no associated expire

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Note

    For Redis version <= 2.8.x, Left(false) will be returned when the key does not exists and when it exists but has no associated expire (Redis returns the same error code for both cases). In other words, you can simply check the following

    result match {
      case Left(_) =>
      case Right(ttl) =>
    }
  194. def type(key: String): Future[Option[Type]]

    Determine the type stored at key.

    Determine the type stored at key.

    key

    key for which the type should be returned

    returns

    type of key, or None if key does not exist

    Definition Classes
    KeyCommands
    Since

    1.0.0

    Note

    This method needs to be called as follows:

    client.`type`(key)
  195. def unwatch(): Future[Unit]

    Forgets about all watched keys.

    Forgets about all watched keys.

    Definition Classes
    TransactionCommands
    Since

    2.2.0

  196. def updateState(request: Request[_]): Unit
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  197. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  198. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  199. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  200. def watch(keys: String*): Future[Unit]

    Watches the given keys, which upon modification, will abort a transaction.

    Watches the given keys, which upon modification, will abort a transaction.

    keys

    keys to watch

    Definition Classes
    TransactionCommands
    Since

    2.2.0

  201. def watchTermination(): Unit
    Attributes
    protected
    Definition Classes
    AbstractAkkaConnection
  202. def withTransaction[A](build: (TransactionBuilder) => A): A

    Executes a transaction and returns whatever the transaction block returns.

    Executes a transaction and returns whatever the transaction block returns.

    build

    the transaction block

    returns

    whatever 'build' returns

    Definition Classes
    TransactionCommands
    Since

    1.2.0

    Exceptions thrown

    RedisTransactionBuilderException when exception occurs during building transaction

  203. def zAdd[W](key: String, members: Map[W, Score])(implicit arg0: Writer[W]): Future[Long]

    Adds one or more members to a sorted set, or update its score if it already exists.

    Adds one or more members to a sorted set, or update its score if it already exists.

    key

    sorted set key

    members

    member-score pairs to be added

    returns

    the number of elements added to the sorted sets, not including elements already existing for which the score was updated

    Definition Classes
    SortedSetCommands
    Since

    2.4

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.

  204. def zAdd[W](key: String, member: W, score: Score)(implicit arg0: Writer[W]): Future[Boolean]

    Adds a member to a sorted set, or update its score if it already exists.

    Adds a member to a sorted set, or update its score if it already exists.

    key

    sorted set key

    member

    member to add

    score

    score of the member to add

    returns

    true if the member was added, or false if the member already exists

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.

  205. def zCard(key: String): Future[Long]

    Returns the number of members in a sorted set.

    Returns the number of members in a sorted set.

    key

    sorted set key

    returns

    the cardinality (number of elements) of the sorted set, or 0 if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  206. def zCount(key: String, min: ScoreLimit, max: ScoreLimit): Future[Long]

    Returns the number of elements of a sorted set belonging to a given score range.

    Returns the number of elements of a sorted set belonging to a given score range.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    returns

    the number of elements in the specified score range

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  207. def zIncrBy[W](key: String, member: W, increment: Double)(implicit arg0: Writer[W]): Future[Double]

    Increments the score of a member in a sorted set.

    Increments the score of a member in a sorted set.

    key

    sorted set key

    member

    member whose score needs to be incremented

    increment

    the increment

    returns

    the new score of member

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  208. def zInterStore(destKey: String, keys: Seq[String], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keys

    keys of sorted sets to intersect

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  209. def zInterStoreWeighted(destKey: String, keysWeightPairs: Map[String, Double], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    Intersects multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keysWeightPairs

    key to weight pairs

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  210. def zLexCount(key: String, min: LexicalScoreLimit, max: LexicalScoreLimit): Future[Long]

    Returns the number of elements of a sorted set belonging to a given lexical score range.

    Returns the number of elements of a sorted set belonging to a given lexical score range.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    returns

    the number of elements in the specified lexical score range

    Definition Classes
    SortedSetCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  211. def zRange[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by index.

    Returns a range of members in a sorted set, by index.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of ascendingly ordered elements in the specified range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. Out of range indexes will not produce an error. If start is larger than the largest index in the sorted set, or start > end, an empty list is returned. If end is larger than the end of the sorted set Redis will treat it like it is the last element of the sorted set. The indexes are inclusive.

  212. def zRangeByLex[R](key: String, min: LexicalScoreLimit, max: LexicalScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by lexical score.

    Returns a range of members in a sorted set, by lexical score.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered elements in the specified lexical range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  213. def zRangeByScore[R](key: String, min: ScoreLimit, max: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by score.

    Returns a range of members in a sorted set, by score.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered elements in the specified score range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).

  214. def zRangeByScoreWithScores[R](key: String, min: ScoreLimit, max: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members with associated scores in a sorted set, by score.

    Returns a range of members with associated scores in a sorted set, by score.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of ascendingly ordered element-score pairs in the specified score range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).

  215. def zRangeWithScores[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members with associated scores in a sorted set, by index.

    Returns a range of members with associated scores in a sorted set, by index.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    end offset (inclusive)

    returns

    the set of ascendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next element and so on. They can also be negative numbers indicating offsets from the end of the sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and so on. Out of range indexes will not produce an error. If start is larger than the largest index in the sorted set, or start > end, an empty list is returned. If end is larger than the end of the sorted set Redis will treat it like it is the last element of the sorted set. The indexes are inclusive.

  216. def zRank[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Long]]

    Determines the index of a member in a sorted set.

    Determines the index of a member in a sorted set.

    key

    sorted set key

    member

    the value

    returns

    the rank or index of the member, or None if the member is not in the set or the key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  217. def zRem[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Removes one or more members from a sorted set.

    Removes one or more members from a sorted set.

    key

    sorted set key

    members

    additional values to be removed (only works with Redis >= 2.4)

    returns

    the number of members removed from the sorted set, not including non existing members

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Redis versions older than 2.4 can only remove one value per call.

  218. def zRemRangeByLex(key: String, min: LexicalScoreLimit, max: LexicalScoreLimit): Future[Long]

    Removes all members in a sorted set within the given lexical range.

    Removes all members in a sorted set within the given lexical range.

    key

    sorted set key

    min

    lexical score lower bound

    max

    lexical score upper bound

    returns

    the number of removed elements

    Definition Classes
    SortedSetCommands
    Since

    2.8.9

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Lexical ordering only applies when all the elements in a sorted set are inserted with the same score

  219. def zRemRangeByRank(key: String, start: Long, stop: Long): Future[Long]

    Removes all members in a sorted set within the given indexes.

    Removes all members in a sorted set within the given indexes.

    key

    sorted set key

    start

    the start offset or index (inclusive)

    stop

    the stop offset or index (inclusive)

    returns

    the number of members removed

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Both start and stop are zero-based inclusive indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.

  220. def zRemRangeByScore(key: String, min: ScoreLimit, max: ScoreLimit): Future[Long]

    Removes all members in a sorted set within the given scores range.

    Removes all members in a sorted set within the given scores range.

    key

    sorted set key

    min

    score lower bound

    max

    score upper bound

    returns

    the number of members removed

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Since version 2.1.6, min and max can be exclusive, following the syntax of ZRANGEBYSCORE.

  221. def zRevRange[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of descendingly ordered elements in the specified range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE.

  222. def zRevRangeByScore[R](key: String, max: ScoreLimit, min: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[R]]

    Returns a range of members in a sorted set, by score, with scores ordered from high to low.

    Returns a range of members in a sorted set, by score, with scores ordered from high to low.

    key

    sorted set key

    max

    score upper bound

    min

    score lower bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.

  223. def zRevRangeByScoreWithScores[R](key: String, max: ScoreLimit, min: ScoreLimit, limitOpt: Option[(Long, Int)] = None)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.

    Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.

    key

    sorted set key

    max

    score upper bound

    min

    score lower bound

    limitOpt

    optional offset and count pair used to limit the number of matching elements

    returns

    the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.

  224. def zRevRangeWithScores[R](key: String, start: Long = 0, stop: Long = -1)(implicit arg0: Reader[R]): Future[LinkedHashSet[(R, Score)]]

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    Returns a range of members in a sorted set, by index, with scores ordered from high to low.

    key

    sorted set key

    start

    start offset (inclusive)

    stop

    stop offset (inclusive)

    returns

    the set of descendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

    Note

    Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE. The elements having the same score are returned in reverse lexicographical order.

  225. def zRevRank[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Long]]

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    Determine the index of a member in a sorted set, with scores ordered from high to low.

    key

    sorted set key

    member

    the value

    returns

    the rank or index of the member, or None if the member is not in the set or the key does not exist

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  226. def zScan[R](key: String, cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None)(implicit arg0: Reader[R]): Future[(Long, LinkedHashSet[(R, Score)])]

    Incrementally iterates the elements (value-score pairs) of a sorted set.

    Incrementally iterates the elements (value-score pairs) of a sorted set.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the sorted set of elements (value-score pairs) as its second element

    Definition Classes
    SortedSetCommands
    Since

    2.8.0

  227. def zScore[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Option[Score]]

    Returns the score associated with the given member in a sorted set.

    Returns the score associated with the given member in a sorted set.

    key

    sorted set key

    member

    the value

    returns

    the score of member, or None if the latter is not in the sorted set or the key does not exist

    Definition Classes
    SortedSetCommands
    Since

    1.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  228. def zUnionStore(destKey: String, keys: Seq[String], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keys

    keys of sorted sets

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

  229. def zUnionStoreWeighted(destKey: String, keysWeightPairs: Map[String, Double], aggregate: Aggregate = scredis.Aggregate.Sum): Future[Long]

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.

    destKey

    sorted set key

    keysWeightPairs

    key to weight pairs

    aggregate

    aggregation function (default is Sum)

    returns

    the number of elements in the resulting sorted set stored at destKey

    Definition Classes
    SortedSetCommands
    Since

    2.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a sorted set

Inherited from TransactionCommands

Inherited from PubSubCommands

Inherited from HyperLogLogCommands

Inherited from ScriptingCommands

Inherited from SortedSetCommands

Inherited from SetCommands

Inherited from ListCommands

Inherited from HashCommands

Inherited from StringCommands

Inherited from GeoCommands

Inherited from KeyCommands

Inherited from ServerCommands

Inherited from ConnectionCommands

Inherited from NonBlockingConnection

Inherited from AbstractAkkaConnection

Inherited from LazyLogging

Inherited from Connection

Inherited from AnyRef

Inherited from Any

Ungrouped