trait SetCommands extends AnyRef
This trait implements set commands.
- Self Type
- SetCommands with NonBlockingConnection
- Alphabetic
- By Inheritance
- SetCommands
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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
-
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
-
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
-
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.
-
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
-
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.
-
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
-
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
-
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
-
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.
-
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
-
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
-
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.
-
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
-
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
-
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.
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )