scredis.commands.async

ListsCommands

trait ListsCommands extends Async

This trait implements asynchronous lists commands.

Linear Supertypes
Async, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ListsCommands
  2. Async
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val DefaultCommandOptions: CommandOptions

    Attributes
    protected
    Definition Classes
    Async
  2. abstract def async[A](body: (Client) ⇒ A)(implicit opts: CommandOptions): Future[A]

    Attributes
    protected
    Definition Classes
    Async

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. def lIndex[A](key: String, index: Long)(implicit opts: CommandOptions = DefaultCommandOptions, parser: Parser[A] = StringParser): Future[Option[A]]

    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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    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.

  15. def lInsert(key: String, pivot: String, value: Any, after: Boolean = true)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    pivot

    value after/before which the element should be inserted

    value

    element to be inserted

    after

    when true, inserts the element after the pivot, when false the element is inserted before the pivot (default is true, i.e. after)

    returns

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

    Since

    2.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  16. def lInsertAfter(key: String, pivot: String, value: Any)(implicit opts: CommandOptions = DefaultCommandOptions): Future[Option[Long]]

    Inserts an element after another element in a list.

    Inserts an element after another element in a list.

    key

    list key

    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

    Since

    2.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  17. def lInsertBefore(key: String, pivot: String, value: Any)(implicit opts: CommandOptions = DefaultCommandOptions): Future[Option[Long]]

    Inserts an element before another element in a list.

    Inserts an element before another element in a list.

    key

    list key

    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

    Since

    2.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  18. def lLen(key: String)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  19. def lPop[A](key: String)(implicit opts: CommandOptions = DefaultCommandOptions, parser: Parser[A] = StringParser): Future[Option[A]]

    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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  20. def lPush(key: String, value: Any, values: Any*)(implicit opts: CommandOptions = DefaultCommandOptions): Future[Long]

    Prepends one or multiple values to a list.

    Prepends one or multiple values to a list.

    key

    list key

    value

    value to prepend

    values

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

    returns

    the length of the list after the push operations

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    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.

  21. def lPushX(key: String, value: Any)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    Since

    2.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  22. def lRange[A](key: String, start: Long = 0, end: Long = 1)(implicit opts: CommandOptions = DefaultCommandOptions, parser: Parser[A] = StringParser): Future[List[A]]

    Returns a range of elements from a list.

    Returns a range of elements from a list.

    key

    list key

    start

    start offset (inclusive)

    end

    end offset (inclusive)

    returns

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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

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

  23. def lRem(key: String, value: Any, count: Long = 0)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    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.
  24. def lSet(key: String, index: Long, value: Any)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if index is out of range or if key contains a non-list value

  25. def lTrim(key: String, start: Long, end: Long)(implicit opts: CommandOptions = DefaultCommandOptions): Future[Unit]

    Trims a list to the specified range.

    Trims a list to the specified range.

    key

    list key

    start

    start offset (inclusive)

    end

    end offset (inclusive)

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    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.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def rPop[A](key: String)(implicit opts: CommandOptions = DefaultCommandOptions, parser: Parser[A] = StringParser): Future[Option[A]]

    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

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  30. def rPopLPush[A](sourceKey: String, destKey: String)(implicit opts: CommandOptions = DefaultCommandOptions, parser: Parser[A] = StringParser): Future[Option[A]]

    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

    Since

    1.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  31. def rPush(key: String, value: Any, values: Any*)(implicit opts: CommandOptions = DefaultCommandOptions): Future[Long]

    Appends one or multiple values to a list.

    Appends one or multiple values to a list.

    key

    list key

    value

    value to prepend

    values

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

    returns

    the length of the list after the push operations

    Since

    1.0.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    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.

  32. def rPushX(key: String, value: Any)(implicit opts: CommandOptions = DefaultCommandOptions): 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

    Since

    2.2.0

    Exceptions thrown
    [[scredis.exceptions.RedisCommandException]]

    if key contains a non-list value

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Async

Inherited from AnyRef

Inherited from Any

Ungrouped