Package org.redisson.api
Interface RSetCacheRx<V>
- Type Parameters:
V- value
- All Superinterfaces:
RCollectionRx<V>,RDestroyable,RExpirableRx,RObjectRx
RxJava2 interface for RSetCache object
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>Stores value with specified time to live.getFairLock(V value) ReturnsRLockinstance associated withvalueReturns lock instance associated withvaluegetPermitExpirableSemaphore(V value) ReturnsRPermitExpirableSemaphoreinstance associated withvaluegetReadWriteLock(V value) ReturnsRReadWriteLockinstance associated withvaluegetSemaphore(V value) ReturnsRSemaphoreinstance associated withvaluereadAll()Read all elements at onceio.reactivex.rxjava3.core.Single<Integer>size()Returns the number of elements in cache.Methods inherited from interface org.redisson.api.RCollectionRx
add, addAll, addAll, contains, containsAll, iterator, remove, removeAll, retainAllMethods inherited from interface org.redisson.api.RDestroyable
destroyMethods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods 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
-
Method Details
-
getPermitExpirableSemaphore
ReturnsRPermitExpirableSemaphoreinstance associated withvalue- Parameters:
value- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
ReturnsRSemaphoreinstance associated withvalue- Parameters:
value- - set value- Returns:
- RSemaphore object
-
getFairLock
ReturnsRLockinstance associated withvalue- Parameters:
value- - set value- Returns:
- RLock object
-
getReadWriteLock
ReturnsRReadWriteLockinstance 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. If0then stores infinitely.unit- - time unit- Returns:
trueif value has been added.falseif value already been in collection.
-
size
io.reactivex.rxjava3.core.Single<Integer> size()Returns the number of elements in cache. This number can reflects expired elements too due to non realtime cleanup process.- Specified by:
sizein interfaceRCollectionRx<V>- Returns:
- size of collection
-
readAll
Read all elements at once- Returns:
- values
-