Package org.redisson.api
Interface RSetCacheRx<V>
-
- Type Parameters:
V- value
- All Superinterfaces:
RCollectionRx<V>,RDestroyable,RExpirableRx,RObjectRx
public interface RSetCacheRx<V> extends RCollectionRx<V>, RDestroyable
RxJava2 interface for RSetCache object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Single<Boolean>add(V value, long ttl, TimeUnit unit)Stores value with specified time to live.RLockRxgetFairLock(V value)ReturnsRLockinstance associated withvalueRLockRxgetLock(V value)Returns lock instance associated withvalueRPermitExpirableSemaphoreRxgetPermitExpirableSemaphore(V value)ReturnsRPermitExpirableSemaphoreinstance associated withvalueRReadWriteLockRxgetReadWriteLock(V value)ReturnsRReadWriteLockinstance associated withvalueRSemaphoreRxgetSemaphore(V value)ReturnsRSemaphoreinstance associated withvalueio.reactivex.rxjava3.core.Single<Set<V>>readAll()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, retainAll
-
Methods inherited from interface org.redisson.api.RDestroyable
destroy
-
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
-
-
-
-
Method Detail
-
getPermitExpirableSemaphore
RPermitExpirableSemaphoreRx getPermitExpirableSemaphore(V value)
ReturnsRPermitExpirableSemaphoreinstance associated withvalue- Parameters:
value- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
RSemaphoreRx getSemaphore(V value)
ReturnsRSemaphoreinstance associated withvalue- Parameters:
value- - set value- Returns:
- RSemaphore object
-
getFairLock
RLockRx getFairLock(V value)
ReturnsRLockinstance associated withvalue- Parameters:
value- - set value- Returns:
- RLock object
-
getReadWriteLock
RReadWriteLockRx getReadWriteLock(V value)
ReturnsRReadWriteLockinstance 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
-
add
io.reactivex.rxjava3.core.Single<Boolean> add(V value, long ttl, TimeUnit unit)
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
-
-