final class KeyCommands[K, V] extends AnyRef
- Alphabetic
- By Inheritance
- KeyCommands
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def del(keys: K*): Task[Long]
Delete one or more keys.
- def dump(key: K): Task[Array[Byte]]
Return a serialized version of the value stored at the specified key.
Return a serialized version of the value stored at the specified key.
- returns
The serialized value.
- See also
DUMP.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists(key: K): Task[Boolean]
- def exists(keys: List[K]): Task[Long]
Determine how many keys exist.
- def expire(key: K, timeout: FiniteDuration): Task[Boolean]
Set a key's time to live with a precision of milliseconds.
Set a key's time to live with a precision of milliseconds.
- returns
true
if the timeout was set.false
if key does not exist or the timeout could not be set.
- See also
- def expireAt(key: K, date: Date): Task[Boolean]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def keyType(key: K): Task[Option[String]]
Determine the type stored at key.
Determine the type stored at key.
- returns
Type of key, or none when key does not exist.
- def keys(pattern: K): Observable[K]
Find all keys matching the given pattern.
- def move(key: K, db: Int): Task[Boolean]
Move a key to another database.
Move a key to another database.
- returns
True if the move operation succeeded, false if not.
- See also
MOVE.
- 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 objectEncoding(key: K): Task[Option[String]]
Shows the kind of internal representation used in order to store the value associated with a key.
Shows the kind of internal representation used in order to store the value associated with a key.
- returns
if exists, returns a String representing the object encoding.
- def objectIdleTime(key: K): Task[Option[FiniteDuration]]
Time since the object stored at the specified key is idle (not requested by read or write operations).
- def objectRefCount(key: K): Task[Long]
todo test Number of references of the value associated with the specified key.
todo test Number of references of the value associated with the specified key. *
- def persist(key: K): Task[Boolean]
Removes the expiration from a key.
Removes the expiration from a key.
- returns
true
if the timeout was removed.false
if key does not exist or does not have an associated timeout.
- See also
- def pttl(key: K): Task[FiniteDuration]
Get the time to live for a key.
Get the time to live for a key.
- returns
It is a variant of the Redis PTTL, but instead of an integer representing milliseconds, it returns aFiniteDuration. A negative value
-2
if the key does not exists, or on unexpected error.
- See also
PTTL.
- def randomKey(): Task[Option[K]]
Return a random key from the keyspace.
Return a random key from the keyspace.
- returns
The random key, or null when the database is empty.
- See also
- def rename(key: K, newKey: K): Task[Unit]
Rename a key.
Rename a key.
- See also
- def renameNx(key: K, newKey: K): Task[Boolean]
Rename a key, only if the new key does not exist.
Rename a key, only if the new key does not exist.
- returns
true
if key was renamed to newkey.false
if newkey already exists.
- See also
- def restore(key: K, ttl: FiniteDuration, value: Array[Byte]): Task[Unit]
Create a key using the provided serialized value, previously obtained using DUMP.
Create a key using the provided serialized value, previously obtained using DUMP.
- See also
- def sort(key: K): Observable[V]
Sort the elements in a list, set or sorted set.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def touch(keys: K*): Task[Long]
Touch one or more keys.
Touch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.
- returns
The number of found keys.
- See also
- def unLink(keys: K*): Task[Long]
Unlink one or more keys (non blocking DEL).
Unlink one or more keys (non blocking DEL).
- returns
The number of keys that were removed.
- See also
- 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()