Package org.redisson.api
Interface RSetRx<V>
-
- Type Parameters:
V
- type of value
- All Superinterfaces:
RCollectionRx<V>
,RExpirableRx
,RObjectRx
,RSortableRx<Set<V>>
public interface RSetRx<V> extends RCollectionRx<V>, RSortableRx<Set<V>>
RxJava2 interface for Redis based implementation ofSet
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Single<Integer>
diff(String... names)
Diff sets specified by name and write to current set.RLockRx
getFairLock(V value)
ReturnsRLock
instance associated withvalue
RLockRx
getLock(V value)
Returns lock instance associated withvalue
RPermitExpirableSemaphoreRx
getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphore
instance associated withvalue
RReadWriteLockRx
getReadWriteLock(V value)
ReturnsRReadWriteLock
instance associated withvalue
RSemaphoreRx
getSemaphore(V value)
ReturnsRSemaphore
instance associated withvalue
io.reactivex.rxjava3.core.Single<Integer>
intersection(String... names)
Intersection sets specified by name and write to current set.io.reactivex.rxjava3.core.Flowable<V>
iterator(int count)
Returns elements iterator fetches elements in a batch.io.reactivex.rxjava3.core.Flowable<V>
iterator(String pattern)
Returns elements iterator.io.reactivex.rxjava3.core.Flowable<V>
iterator(String pattern, int count)
Returns elements iterator fetches elements in a batch.io.reactivex.rxjava3.core.Single<Boolean>
move(String destination, V member)
Move a member from this set to the given destination set in async mode.io.reactivex.rxjava3.core.Maybe<V>
random()
Returns random elementio.reactivex.rxjava3.core.Single<Set<V>>
random(int count)
Returns random elements from set limited bycount
io.reactivex.rxjava3.core.Single<Set<V>>
readAll()
Read all elements at onceio.reactivex.rxjava3.core.Single<Set<V>>
readDiff(String... names)
Diff sets specified by name with current set.io.reactivex.rxjava3.core.Single<Set<V>>
readIntersection(String... names)
Intersection sets specified by name with current set.io.reactivex.rxjava3.core.Single<Set<V>>
readUnion(String... names)
Union sets specified by name with current set.io.reactivex.rxjava3.core.Maybe<V>
removeRandom()
Removes and returns random elementio.reactivex.rxjava3.core.Single<Set<V>>
removeRandom(int amount)
Removes and returns random elements limited byamount
io.reactivex.rxjava3.core.Single<Integer>
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, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectRx
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RSortableRx
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
-
-
-
Method Detail
-
getPermitExpirableSemaphore
RPermitExpirableSemaphoreRx getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
RSemaphoreRx getSemaphore(V value)
ReturnsRSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RSemaphore object
-
getFairLock
RLockRx getFairLock(V value)
ReturnsRLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
getReadWriteLock
RReadWriteLockRx getReadWriteLock(V value)
ReturnsRReadWriteLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
getLock
RLockRx getLock(V value)
Returns lock instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
iterator
io.reactivex.rxjava3.core.Flowable<V> iterator(int count)
Returns elements iterator fetches elements in a batch. Batch size is defined bycount
param.- Parameters:
count
- - size of elements batch- Returns:
- iterator
-
iterator
io.reactivex.rxjava3.core.Flowable<V> iterator(String pattern, int count)
Returns elements iterator fetches elements in a 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.rxjava3.core.Flowable<V> iterator(String pattern)
Returns elements iterator. Ifpattern
is not null then only elements match this pattern are loaded.- Parameters:
pattern
- - search pattern- Returns:
- iterator
-
removeRandom
io.reactivex.rxjava3.core.Single<Set<V>> removeRandom(int amount)
Removes and returns random elements limited byamount
- Parameters:
amount
- of random elements- Returns:
- random elements
-
removeRandom
io.reactivex.rxjava3.core.Maybe<V> removeRandom()
Removes and returns random element- Returns:
- random element
-
random
io.reactivex.rxjava3.core.Maybe<V> random()
Returns random element- Returns:
- random element
-
random
io.reactivex.rxjava3.core.Single<Set<V>> random(int count)
Returns random elements from set limited bycount
- Parameters:
count
- - values amount to return- Returns:
- random elements
-
move
io.reactivex.rxjava3.core.Single<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
-
readAll
io.reactivex.rxjava3.core.Single<Set<V>> readAll()
Read all elements at once- Returns:
- values
-
union
io.reactivex.rxjava3.core.Single<Integer> 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.rxjava3.core.Single<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.rxjava3.core.Single<Integer> 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.rxjava3.core.Single<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.rxjava3.core.Single<Integer> 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
-
-