t

scredis.commands

SetCommands

trait SetCommands extends AnyRef

This trait implements set commands.

Self Type
SetCommands with NonBlockingConnection
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SetCommands
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. def sAdd[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Adds one or more members to a set.

    Adds one or more members to a set.

    key

    set key

    members

    member(s) to add

    returns

    the number of members added to the set, not including all the members that were already present

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  16. def sCard(key: String): Future[Long]

    Returns the number of members in a set.

    Returns the number of members in a set.

    key

    set key

    returns

    the cardinality (number of members) of the set, or 0 if key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  17. def sDiff[R](key: String, keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns the set resulting from the difference between the first set and all the successive sets.

    Returns the set resulting from the difference between the first set and all the successive sets.

    key

    the key of the first set

    keys

    key(s) of successive set(s) whose members will be substracted from the first one

    returns

    the resulting set, or the empty set if the first key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  18. def sDiffStore(destKey: String, key: String, keys: String*): Future[Long]

    Stores the set resulting from the difference between the first set and all the successive sets.

    Stores the set resulting from the difference between the first set and all the successive sets.

    destKey

    key where to store the resulting set

    key

    key of first set

    keys

    keys of sets to be substracted from first set, if empty, first set is simply copied to destKey

    returns

    the cardinality of the resulting set

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  19. def sInter[R](keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Intersects multiple sets.

    Intersects multiple sets.

    keys

    keys of sets to be intersected together

    returns

    the resulting set, or the empty set if the first key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  20. def sInterStore(destKey: String, keys: String*): Future[Long]

    Intersects multiple sets and stores the resulting set in a key.

    Intersects multiple sets and stores the resulting set in a key.

    destKey

    key where to store the resulting set

    keys

    keys of sets to be intersected together, if only one is specified, it is simply copied to destKey

    returns

    the cardinality of the resulting set

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  21. def sIsMember[W](key: String, member: W)(implicit arg0: Writer[W]): Future[Boolean]

    Determines if a given value is a member of a set.

    Determines if a given value is a member of a set.

    key

    set key

    member

    value to be tested

    returns

    true if the provided value is a member of the set stored at key, false otherwise

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  22. def sMembers[R](key: String)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns all the members of a set.

    Returns all the members of a set.

    key

    set key

    returns

    set stored at key, or the empty set if key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  23. def sMove[W](sourceKey: String, destKey: String, member: W)(implicit arg0: Writer[W]): Future[Boolean]

    Moves a member from one set to another.

    Moves a member from one set to another.

    sourceKey

    key of source set

    member

    value to be moved from source set to destination set

    returns

    true if the member was moved, false if the element is not a member of source set and no operation was performed

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if sourceKey or destKey contains a value that is not a set

  24. def sPop[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Removes and returns a random member from a set.

    Removes and returns a random member from a set.

    key

    set key

    returns

    random member, or None if key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.

  25. def sPopCount[R](key: String, count: Int)(implicit arg0: Reader[R]): Future[List[R]]

    Removes and returns a random 'count' members from a set.

    Removes and returns a random 'count' members from a set.

    key

    set key

    count

    maximum number of returned elements

    returns

    list of random members which size is less or equal to 'count'

    Since

    3.2.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.

    See also

    https://redis.io/commands/spop

  26. def sRandMember[R](key: String)(implicit arg0: Reader[R]): Future[Option[R]]

    Returns a random member from a set (without removing it).

    Returns a random member from a set (without removing it).

    key

    set key

    returns

    random member, or None if key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  27. def sRandMembers[R](key: String, count: Int = 1)(implicit arg0: Reader[R]): Future[Set[R]]

    Returns a random member from a set (without removing it).

    Returns a random member from a set (without removing it).

    key

    set key

    count

    number of member to randomly retrieve

    returns

    set of random members, or the empty set if key does not exist

    Since

    2.6.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

  28. def sRem[W](key: String, members: W*)(implicit arg0: Writer[W]): Future[Long]

    Removes one or more members from a set.

    Removes one or more members from a set.

    key

    set key

    members

    members to remove from set

    returns

    the number of members that were removed from the set, not including non-existing members

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if key contains a value that is not a set

    Note

    Redis versions older than 2.4 can only remove one member per call.

  29. def sScan[R](key: String, cursor: Long, matchOpt: Option[String] = None, countOpt: Option[Int] = None)(implicit arg0: Reader[R]): Future[(Long, Set[R])]

    Incrementally iterates the elements of a set.

    Incrementally iterates the elements of a set.

    cursor

    the offset

    matchOpt

    when defined, the command only returns elements matching the pattern

    countOpt

    when defined, provides a hint of how many elements should be returned

    returns

    a pair containing the next cursor as its first element and the set of elements as its second element

    Since

    2.8.0

  30. def sUnion[R](keys: String*)(implicit arg0: Reader[R]): Future[Set[R]]

    Computes the union of multiple sets.

    Computes the union of multiple sets.

    keys

    keys of sets to be included in the union computation

    returns

    the resulting set, or the empty set if the first key does not exist

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

  31. def sUnionStore(destKey: String, keys: String*): Future[Long]

    Computes the union of multiple sets and stores the resulting set in a key.

    Computes the union of multiple sets and stores the resulting set in a key.

    destKey

    key where to store the resulting set

    keys

    keys of sets to be included in the union computation, if only one is specified, it is simply copied to destKey

    returns

    the cardinality of the resulting set

    Since

    1.0.0

    Exceptions thrown

    [[scredis.exceptions.RedisErrorResponseException]] if some keys contain a value that is not a set

    Note

    If destKey already exists, it is overwritten.

  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped