trait ServerCommands extends AnyRef
This trait implements server commands.
- Self Type
- ServerCommands with NonBlockingConnection
- Alphabetic
- By Inheritance
- ServerCommands
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bgRewriteAOF(): Future[Unit]
Asynchronously rewrites the append-only file.
Asynchronously rewrites the append-only file.
- Since
1.0.0
- def bgSave(): Future[Unit]
Asynchronously saves the dataset to disk.
Asynchronously saves the dataset to disk.
- Since
1.0.0
- Exceptions thrown
[[scredis.exceptions.RedisErrorResponseException]]
if the background save is already in progress
- 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
- Since
2.6.9
- 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
- Since
2.4.0
- Exceptions thrown
[[scredis.exceptions.RedisErrorResponseException]]
if the the client does not exist
- 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)
- Since
2.8.12
- def clientList(): Future[List[Map[String, String]]]
Lists all client connections.
Lists all client connections.
- returns
list of clients
- Since
2.4.0
- 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
- Since
2.9.50
- Exceptions thrown
[[scredis.exceptions.RedisErrorResponseException]]
if the timeout is invalid
- 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
- Since
2.6.9
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- Since
2.8.13
- 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
- Since
2.8.13
- 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
- Since
2.8.13
- 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
- Since
2.8.13
- 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
- Since
2.0.0
- def configResetStat(): Future[Unit]
Resets the stats returned by INFO.
Resets the stats returned by INFO.
- Since
2.0.0
- 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.
- Since
2.8.0
- Exceptions thrown
[[scredis.exceptions.RedisErrorResponseException]]
if the configuration file was not properly written
- 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
- Since
2.0.0
- Exceptions thrown
[[scredis.exceptions.RedisErrorResponseException]]
if the parameter could not be set
- 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
- Since
1.0.0
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flushAll(): Future[Unit]
Removes all keys from all databases.
Removes all keys from all databases.
- Since
1.0.0
- def flushDB(): Future[Unit]
Removes all keys from the current database.
Removes all keys from the current database.
- Since
1.0.0
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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
- Since
1.0.0
- Note
The section can additionally take the following values:
all
anddefault
.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- Since
1.0.0
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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
- 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).
- def save(): Future[Unit]
Synchronously saves the dataset to disk.
Synchronously saves the dataset to disk.
- Since
1.0.0
- def shutdown(modifierOpt: Option[ShutdownModifier] = None): Future[Unit]
Gracefully shuts down a
Redis
server.Gracefully shuts down a
Redis
server.- modifierOpt
optional scredis.ShutdownModifier
- 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
- def slaveOf(host: String, port: Int): Future[Unit]
Configures the current
Redis
instance as a slave of anotherRedis
instance.Configures the current
Redis
instance as a slave of anotherRedis
instance.- host
the host of the master instance
- port
the port of the master instance
- Since
1.0.0
- 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.- Since
1.0.0
- 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
- Since
2.2.12
- 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
- Since
2.2.12
- def slowLogReset(): Future[Unit]
Resets the slowlog.
Resets the slowlog.
- Since
2.2.12
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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
- Since
2.6.0
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()