Package org.redisson.api
Interface RSetRx<V>
-
- Type Parameters:
V
- value
- All Superinterfaces:
RCollectionRx<V>
,RExpirableRx
,RObjectRx
,RSortableRx<Set<V>>
public interface RSetRx<V> extends RCollectionRx<V>, RSortableRx<Set<V>>
Async set functions- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Flowable<Long>
diff(String... names)
Diff sets specified by name and write to current set.io.reactivex.Flowable<Long>
intersection(String... names)
Intersection sets specified by name and write to current set.io.reactivex.Flowable<V>
iterator(int count)
Returns an iterator over elements in this set.io.reactivex.Flowable<V>
iterator(String pattern)
Returns iterator over elements in this set matchespattern
.io.reactivex.Flowable<V>
iterator(String pattern, int count)
Returns an iterator over elements in this set.io.reactivex.Flowable<Boolean>
move(String destination, V member)
Move a member from this set to the given destination set in async mode.io.reactivex.Flowable<V>
random()
Returns random element from set in async modeio.reactivex.Flowable<Set<V>>
readAll()
Read all elements at onceio.reactivex.Flowable<Set<V>>
readDiff(String... names)
Diff sets specified by name with current set.io.reactivex.Flowable<Set<V>>
readIntersection(String... names)
Intersection sets specified by name with current set.io.reactivex.Flowable<Set<V>>
readUnion(String... names)
Union sets specified by name with current set.io.reactivex.Flowable<V>
removeRandom()
Removes and returns random element from set in async modeio.reactivex.Flowable<Set<V>>
removeRandom(int amount)
Removes and returns random elements from set in async modeio.reactivex.Flowable<Long>
union(String... names)
Union sets specified by name and write to current set.-
Methods inherited from interface org.redisson.api.RCollectionRx
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
-
Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectRx
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
-
Methods inherited from interface org.redisson.api.RSortableRx
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
-
-
-
Method Detail
-
iterator
io.reactivex.Flowable<V> iterator(int count)
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycount
param.- Parameters:
count
- - size of elements batch- Returns:
- iterator
-
iterator
io.reactivex.Flowable<V> iterator(String pattern, int count)
Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded.- Parameters:
pattern
- - search patterncount
- - size of elements batch- Returns:
- iterator
-
iterator
io.reactivex.Flowable<V> iterator(String pattern)
Returns iterator over elements in this set matchespattern
.- Parameters:
pattern
- - search pattern- Returns:
- iterator
-
removeRandom
io.reactivex.Flowable<Set<V>> removeRandom(int amount)
Removes and returns random elements from set in async mode- Parameters:
amount
- of random values- Returns:
- random values
-
removeRandom
io.reactivex.Flowable<V> removeRandom()
Removes and returns random element from set in async mode- Returns:
- value
-
random
io.reactivex.Flowable<V> random()
Returns random element from set in async mode- Returns:
- value
-
move
io.reactivex.Flowable<Boolean> move(String destination, V member)
Move a member from this set to the given destination set in async mode.- Parameters:
destination
- the destination setmember
- the member to move- Returns:
- true if the element is moved, false if the element is not a member of this set or no operation was performed
-
union
io.reactivex.Flowable<Long> union(String... names)
Union sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of union
-
readUnion
io.reactivex.Flowable<Set<V>> readUnion(String... names)
Union sets specified by name with current set. Without current set state change.- Parameters:
names
- - name of sets- Returns:
- size of union
-
diff
io.reactivex.Flowable<Long> diff(String... names)
Diff sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of diff
-
readDiff
io.reactivex.Flowable<Set<V>> readDiff(String... names)
Diff sets specified by name with current set. Without current set state change.- Parameters:
names
- - name of sets- Returns:
- values
-
intersection
io.reactivex.Flowable<Long> intersection(String... names)
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
-