final class StringCommands[K, V] extends AnyRef
Exposes the set of redis string commands available.
- Source
- StringCommands.scala
- Note
Does not support
bitfield
.- See also
- Alphabetic
- By Inheritance
- StringCommands
- 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
- def append(key: K, value: V): Task[Long]
Append a value to a key.
Append a value to a key.
- returns
The length of the string after the append operation. 0 if the key was empty.
- See also
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bitCount(key: K, start: Long, end: Long): Task[Long]
Count set bits in a string.
- def bitCount(key: K): Task[Long]
Count set bits in a string.
- def bitOpAnd(destination: K, keys: K*): Task[Long]
Perform bitwise
AND
between strings.Perform bitwise
AND
between strings.- returns
The size of the string stored in the destination key, that is equal to the size of the longest input string.
- See also
- def bitOpNot(destination: K, source: K): Task[Long]
Perform bitwise NOT between strings.
Perform bitwise NOT between strings.
- returns
The size of the string stored in the destination key, that is equal to the size of the longest input string.
- See also
- def bitOpOr(destination: K, keys: K*): Task[Long]
Perform bitwise OR between strings.
Perform bitwise OR between strings.
- returns
The size of the string stored in the destination key, that is equal to the size of the longest input string.
- See also
- def bitOpXor(destination: K, keys: K*): Task[Long]
Perform bitwise XOR between strings.
Perform bitwise XOR between strings.
- returns
The size of the string stored in the destination key, that is equal to the size of the longest input string.
- See also
- def bitPosOne(key: K): Task[Option[Long]]
Find the position of the first bit set in a string.
Find the position of the first bit set in a string.
- returns
The command returns the position of the first bit set to 1. None if the key did not exist If the string is empty or composed of just zero bytes, -1 is returned.
- def bitPosZero(key: K): Task[Option[Long]]
Find the position of the first bit clear in a string.
Find the position of the first bit clear in a string.
- returns
The command returns the position of the first bit set to 1. If the key did not exist, was empty or composed of just zero bytes, None is returned.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def decr(key: K): Task[Option[Long]]
Decrement the integer value of a key by one.
Decrement the integer value of a key by one.
- returns
The value of key after the decrement
- See also
DECR.
- def decrBy(key: K, amount: Long): Task[Option[Long]]
Decrement the integer value of a key by the given number.
Decrement the integer value of a key by the given number.
- returns
The value of key after the decrement.
- See also
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(key: K): Task[Option[V]]
Get the value of a key.
- def getBit(key: K, offset: Long): Task[Option[Long]]
Returns the bit value at offset in the string value stored at key.
Returns the bit value at offset in the string value stored at key.
- returns
The bit value stored at offset.
- See also
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getRange(key: K, start: Long, end: Long): Task[Option[V]]
Get a substring of the string stored at a key.
Get a substring of the string stored at a key. Fixme: return None on empty strings
- See also
- def getSet(key: K, value: V): Task[Option[V]]
Set the string value of a key and return its old value.
Set the string value of a key and return its old value.
- returns
The old value stored at key, or null when key did not exist.
- See also
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def incr(key: K): Task[Option[Long]]
Increment the integer value of a key by one.
Increment the integer value of a key by one.
- returns
The value of key after the increment.
- See also
INCR.
- def incrBy(key: K, amount: Long): Task[Option[Long]]
Increment the integer value of a key by the given amount.
Increment the integer value of a key by the given amount.
- returns
The value of key after the increment.
- See also
- def incrByFloat(key: K, amount: Double): Task[Option[Double]]
Increment the float value of a key by the given amount.
Increment the float value of a key by the given amount.
- returns
Double bulk string reply the value of key after the increment.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mGet(keys: List[K]): Observable[(K, Option[V])]
Get the values of all the given keys.
- def mGet(keys: K*): Observable[(K, Option[V])]
Get the values of all the given keys.
- def mSet(map: Map[K, V]): Task[Unit]
Set multiple keys to multiple values.
- def mSetNx(map: Map[K, V]): Task[Boolean]
Set multiple keys to multiple values, only if none of the keys exist.
Set multiple keys to multiple values, only if none of the keys exist.
- returns
True if the all the keys were set. False if a key was not set (at least one key already existed).
- See also
- 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 set(key: K, value: V): Task[Unit]
Set the string value of a key.
Set the string value of a key.
- See also
SET.
- def setBit(key: K, offset: Long, value: Int): Task[Option[Long]]
Sets or clears the bit at offset in the string value stored at key.
Sets or clears the bit at offset in the string value stored at key.
- returns
The original bit value stored at offset.
- See also
- def setEx(key: K, timeout: FiniteDuration, value: V): Task[Unit]
Set the value and expiration of a key given a timeout in FiniteDuration (with milliseconds precision).
Set the value and expiration of a key given a timeout in FiniteDuration (with milliseconds precision).
- See also
- def setNx(key: K, value: V): Task[Boolean]
Set the value of a key, only if the key does not exist.
Set the value of a key, only if the key does not exist.
- returns
true
if the key was set, otherwisefalse
.
- See also
- def setRange(key: K, offset: Long, value: V): Task[Long]
Overwrite part of a string at key starting at the specified offset.
Overwrite part of a string at key starting at the specified offset.
- returns
The length of the string after it was modified by the command.
- See also
- def strLen(key: K): Task[Long]
Get the length of the value stored in a key.
Get the length of the value stored in a key.
- returns
The length of the string at key, or 0 when key does not exist.
- See also
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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()