Package org.redisson.api
Interface RTransactionRx
- All Known Implementing Classes:
RedissonTransactionRx
public interface RTransactionRx
RxJava2 interface for transaction object allows to execute transactions over Redisson objects.
Uses locks for write operations and maintains data modification operations list till the commit/rollback operation.
Transaction isolation level: READ_COMMITTED
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
commit()
Commits all changes made on this transaction.<V> RBucketRx
<V> Returns transactional object holder instance by name.<V> RBucketRx
<V> Returns transactional object holder instance by name using provided codec for object.<K,
V> RMapRx <K, V> Returns transactional map instance by name.<K,
V> RMapRx <K, V> Returns transactional map instance by name using provided codec for both map keys and values.<K,
V> RMapCacheRx <K, V> getMapCache
(String name) Returns transactional map-based cache instance by name.<K,
V> RMapCacheRx <K, V> getMapCache
(String name, Codec codec) Returns transactional map-based cache instance byname
using providedcodec
for both cache keys and values.<V> RSetRx
<V> Returns transactional set instance by name.<V> RSetRx
<V> Returns transactional set instance by name using provided codec for set objects.<V> RSetCacheRx
<V> getSetCache
(String name) Returns transactional set-based cache instance byname
.<V> RSetCacheRx
<V> getSetCache
(String name, Codec codec) Returns transactional set-based cache instance byname
.io.reactivex.rxjava3.core.Completable
rollback()
Rollback all changes made on this transaction.
-
Method Details
-
getBucket
Returns transactional object holder instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
Returns transactional object holder instance by name using provided codec for object.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Bucket object
-
getMap
Returns transactional map instance by name.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
Returns transactional map instance by name using provided codec for both map keys and values.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of objectcodec
- - codec for keys and values- Returns:
- Map object
-
getSet
Returns transactional set instance by name.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
Returns transactional set instance by name using provided codec for set objects.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Set object
-
getSetCache
Returns transactional set-based cache instance byname
. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSet(String)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
Returns transactional set-based cache instance byname
. Supports value eviction with a given TTL value.If eviction is not required then it's better to use regular map
getSet(String, Codec)
.- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
getMapCache
Returns transactional map-based cache instance by name. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
getMap(String)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getMapCache
Returns transactional map-based cache instance byname
using providedcodec
for both cache keys and values. Supports entry eviction with a given MaxIdleTime and TTL settings.If eviction is not required then it's better to use regular map
getMap(String, Codec)
.- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - object namecodec
- - codec for keys and values- Returns:
- MapCache object
-
commit
io.reactivex.rxjava3.core.Completable commit()Commits all changes made on this transaction.- Returns:
- void
-
rollback
io.reactivex.rxjava3.core.Completable rollback()Rollback all changes made on this transaction.- Returns:
- void
-