public interface ISetCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
Long |
sAdd(K key,
V... values)
Add given
values to set at key. |
Long |
sCard(K key)
Get size of set at
key. |
Set<V> |
sDiff(K key,
Collection<K> otherKeys)
Diff all sets for given
key and otherKeys. |
Set<V> |
sDiff(K key,
K otherKey)
Diff all sets for given
key and otherKey. |
Long |
sDiffStore(K key,
Collection<K> otherKeys,
K destKey)
Diff all sets for given
key and otherKeys and store result in destKey. |
Long |
sDiffStore(K key,
K otherKey,
K destKey)
Diff all sets for given
key and otherKey and store result in destKey. |
Set<V> |
sInter(K key,
Collection<K> otherKeys)
Returns the members intersecting all given sets at
key and otherKeys. |
Set<V> |
sInter(K key,
K otherKey)
Returns the members intersecting all given sets at
key and otherKey. |
Long |
sInterStore(K key,
Collection<K> otherKeys,
K destKey)
Intersect all given sets at
key and otherKeys and store result in destKey. |
Long |
sInterstore(K key,
K otherKey,
K destKey)
Intersect all given sets at
key and otherKey and store result in destKey. |
Boolean |
sIsMember(K key,
Object member)
Check if set at
key contains value. |
Set<V> |
sMembers(K key)
Get all elements of set at
key. |
V |
sPop(K key)
Remove and return a random member from set at
key. |
V |
sRandMember(K key)
Get random element from set at
key. |
List<V> |
sRandMember(K key,
long count)
Get
count random elements from set at key. |
Long |
sRem(K key,
Object... members)
Remove given
values from set at key and return the number of removed elements. |
Set<V> |
sUnion(K key,
Collection<K> otherKeys)
Union all sets at given
keys and otherKeys. |
Set<V> |
sUnion(K key,
K otherKey)
Union all sets at given
keys and otherKey. |
Long |
sUnionStore(K key,
Collection<K> otherKeys,
K destKey)
Union all sets at given
key and otherKeys and store result in destKey. |
Long |
sUnionStore(K key,
K otherKey,
K destKey)
Union all sets at given
key and otherKey and store result in destKey. |
@Nullable Long sAdd(K key, V... values)
values to set at key.key - must not be null.values - @Nullable Long sCard(K key)
key.key - must not be null.@Nullable V sPop(K key)
key.key - must not be null.@Nullable Set<V> sMembers(K key)
key.key - must not be null.@Nullable Boolean sIsMember(K key, Object member)
key contains value.key - must not be null.member - @Nullable Set<V> sInter(K key, K otherKey)
key and otherKey.key - must not be null.otherKey - must not be null.@Nullable Set<V> sInter(K key, Collection<K> otherKeys)
key and otherKeys.key - must not be null.otherKeys - must not be null.@Nullable Long sInterstore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.key - must not be null.otherKey - must not be null.destKey - must not be null.@Nullable Long sInterStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.key - must not be null.otherKeys - must not be null.destKey - must not be null.V sRandMember(K key)
key.key - must not be null.@Nullable List<V> sRandMember(K key, long count)
count random elements from set at key.key - must not be null.count - nr of members to return.List if key does not exist or null when used in pipeline / transaction.IllegalArgumentException - if count is negative.@Nullable Long sRem(K key, Object... members)
values from set at key and return the number of removed elements.key - must not be null.members - @Nullable Set<V> sUnion(K key, K otherKey)
keys and otherKey.key - must not be null.otherKey - must not be null.@Nullable Set<V> sUnion(K key, Collection<K> otherKeys)
keys and otherKeys.key - must not be null.otherKeys - must not be null.@Nullable Long sUnionStore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.key - must not be null.otherKey - must not be null.destKey - must not be null.@Nullable Long sUnionStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.key - must not be null.otherKeys - must not be null.destKey - must not be null.@Nullable Set<V> sDiff(K key, K otherKey)
key and otherKey.key - must not be null.otherKey - must not be null.@Nullable Set<V> sDiff(K key, Collection<K> otherKeys)
key and otherKeys.key - must not be null.otherKeys - must not be null.@Nullable Long sDiffStore(K key, K otherKey, K destKey)
key and otherKey and store result in destKey.key - must not be null.otherKey - must not be null.destKey - must not be null.@Nullable Long sDiffStore(K key, Collection<K> otherKeys, K destKey)
key and otherKeys and store result in destKey.key - must not be null.otherKeys - must not be null.destKey - must not be null.Copyright © 2021. All rights reserved.