Trait

scredis.commands

ListCommands

Related Doc: package commands

Permalink

trait ListCommands extends AnyRef

This trait implements list commands.

Self Type
ListCommands with NonBlockingConnection
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ListCommands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  12. def lIndex[R](key: String, index: Long)(implicit arg0: Reader[R]): Future[Option[R]]

    Permalink

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

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

    Permalink

    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

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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

    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.

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

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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

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

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

    Permalink

    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.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.
  20. def lSet[W](key: String, index: Long, value: W)(implicit arg0: Writer[W]): Future[Unit]

    Permalink

    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.RedisErrorResponseException]] if index is out of range or if key contains a non-list value

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

    Permalink

    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)

    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.

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

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def rPop[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink

    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

    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.

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

    Permalink

    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.RedisErrorResponseException]] if key contains a non-list value

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

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped