Package org.redisson.api
Interface RSetCacheReactive<V>
- Type Parameters:
V
- value
- All Superinterfaces:
RCollectionReactive<V>
,RDestroyable
,RExpirableReactive
,RObjectReactive
Reactive interface for RSetCache object
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean>
Stores value with specified time to live.getFairLock
(V value) ReturnsRLock
instance associated withvalue
Returns lock instance associated withvalue
getPermitExpirableSemaphore
(V value) ReturnsRPermitExpirableSemaphore
instance associated withvalue
getReadWriteLock
(V value) ReturnsRReadWriteLock
instance associated withvalue
getSemaphore
(V value) ReturnsRSemaphore
instance associated withvalue
readAll()
Read all elements at oncereactor.core.publisher.Mono<Integer>
size()
Returns the number of elements in cache.reactor.core.publisher.Mono<Boolean>
Tries to add elements only if none of them in set.reactor.core.publisher.Mono<Boolean>
Tries to add elements only if none of them in set.Methods inherited from interface org.redisson.api.RCollectionReactive
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAll
Methods inherited from interface org.redisson.api.RDestroyable
destroy
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, 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
-
Method Details
-
getPermitExpirableSemaphore
ReturnsRPermitExpirableSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
ReturnsRSemaphore
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RSemaphore object
-
getFairLock
ReturnsRLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
getReadWriteLock
ReturnsRReadWriteLock
instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
getLock
Returns lock instance associated withvalue
- Parameters:
value
- - set value- Returns:
- RLock object
-
add
Stores value with specified time to live. Value expires after specified time to live.- Parameters:
value
- to addttl
- - time to live for key\value entry. If0
then stores infinitely.unit
- - time unit- Returns:
true
if value has been added.false
if value already been in collection.
-
size
reactor.core.publisher.Mono<Integer> size()Returns the number of elements in cache. This number can reflects expired elements too due to non realtime cleanup process.- Specified by:
size
in interfaceRCollectionReactive<V>
- Returns:
- size of collection
-
readAll
Read all elements at once- Returns:
- values
-
tryAdd
Tries to add elements only if none of them in set.- Parameters:
values
- - values to add- Returns:
true
if elements successfully added, otherwisefalse
.
-
tryAdd
Tries to add elements only if none of them in set.- Parameters:
values
- - values to addttl
- - time to live for value. If0
then stores infinitely.unit
- - time unit- Returns:
true
if elements successfully added, otherwisefalse
.
-