Package org.redisson.api
Interface RSetReactive<V>
-
- Type Parameters:
V
- type of value
- All Superinterfaces:
RCollectionReactive<V>
,RExpirableReactive
,RObjectReactive
,RSortableReactive<Set<V>>
public interface RSetReactive<V> extends RCollectionReactive<V>, RSortableReactive<Set<V>>
Reactive interface for Redis based implementation ofSet
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Integer>
diff(String... names)
Diff sets specified by name and write to current set.RLockReactive
getFairLock(V value)
ReturnsRLock
instance associated withvalue
RLockReactive
getLock(V value)
Returns lock instance associated withvalue
RPermitExpirableSemaphoreReactive
getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphore
instance associated withvalue
RReadWriteLockReactive
getReadWriteLock(V value)
ReturnsRReadWriteLock
instance associated withvalue
RSemaphoreReactive
getSemaphore(V value)
ReturnsRSemaphore
instance associated withvalue
reactor.core.publisher.Mono<Integer>
intersection(String... names)
Intersection sets specified by name and write to current set.reactor.core.publisher.Flux<V>
iterator(int count)
Returns elements iterator fetches elements in a batch.reactor.core.publisher.Flux<V>
iterator(String pattern)
Returns elements iterator.reactor.core.publisher.Flux<V>
iterator(String pattern, int count)
Returns elements iterator fetches elements in a batch.reactor.core.publisher.Mono<Boolean>
move(String destination, V member)
Move a member from this set to the given destination set in async mode.reactor.core.publisher.Mono<V>
random()
Returns random elementreactor.core.publisher.Mono<Set<V>>
random(int count)
Returns random elements from set limited bycount
reactor.core.publisher.Mono<Set<V>>
readAll()
Read all elements at oncereactor.core.publisher.Mono<Set<V>>
readDiff(String... names)
Diff sets specified by name with current set.reactor.core.publisher.Mono<Set<V>>
readIntersection(String... names)
Intersection sets specified by name with current set.reactor.core.publisher.Mono<Set<V>>
readUnion(String... names)
Union sets specified by name with current set.reactor.core.publisher.Mono<V>
removeRandom()
Removes and returns random elementreactor.core.publisher.Mono<Set<V>>
removeRandom(int amount)
Removes and returns random elements limited byamount
reactor.core.publisher.Mono<Integer>
union(String... names)
Union sets specified by name and write to current set.-
Methods inherited from interface org.redisson.api.RCollectionReactive
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll, size
-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
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.RSortableReactive
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
-
-
-
Method Detail
-
getPermitExpirableSemaphore
RPermitExpirableSemaphoreReactive getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
RSemaphoreReactive getSemaphore(V value)
ReturnsRSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RSemaphore object
-
getFairLock
RLockReactive getFairLock(V value)
ReturnsRLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
getReadWriteLock
RReadWriteLockReactive getReadWriteLock(V value)
ReturnsRReadWriteLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
getLock
RLockReactive getLock(V value)
Returns lock instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
iterator
reactor.core.publisher.Flux<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
reactor.core.publisher.Flux<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
reactor.core.publisher.Flux<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
reactor.core.publisher.Mono<Set<V>> removeRandom(int amount)
Removes and returns random elements limited byamount
- Parameters:
amount
- of random elements- Returns:
- random elements
-
removeRandom
reactor.core.publisher.Mono<V> removeRandom()
Removes and returns random element- Returns:
- random element
-
random
reactor.core.publisher.Mono<V> random()
Returns random element- Returns:
- random element
-
random
reactor.core.publisher.Mono<Set<V>> random(int count)
Returns random elements from set limited bycount
- Parameters:
count
- - values amount to return- Returns:
- random elements
-
move
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
reactor.core.publisher.Mono<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
-
-