Package org.redisson.rx
Class RedissonTransactionRx
- java.lang.Object
-
- org.redisson.rx.RedissonTransactionRx
-
- All Implemented Interfaces:
RTransactionRx
public class RedissonTransactionRx extends Object implements RTransactionRx
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description RedissonTransactionRx(CommandRxExecutor executorService, TransactionOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Completablecommit()Commits all changes made on this transaction.<V> RBucketRx<V>getBucket(String name)Returns transactional object holder instance by name.<V> RBucketRx<V>getBucket(String name, Codec codec)Returns transactional object holder instance by name using provided codec for object.<K,V>
RMapRx<K,V>getMap(String name)Returns transactional map instance by name.<K,V>
RMapRx<K,V>getMap(String name, Codec codec)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 bynameusing providedcodecfor both cache keys and values.<V> RSetRx<V>getSet(String name)Returns transactional set instance by name.<V> RSetRx<V>getSet(String name, Codec codec)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.Completablerollback()Rollback all changes made on this transaction.
-
-
-
Constructor Detail
-
RedissonTransactionRx
public RedissonTransactionRx(CommandRxExecutor executorService, TransactionOptions options)
-
-
Method Detail
-
getBucket
public <V> RBucketRx<V> getBucket(String name)
Description copied from interface:RTransactionRxReturns transactional object holder instance by name.- Specified by:
getBucketin interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Bucket object
-
getBucket
public <V> RBucketRx<V> getBucket(String name, Codec codec)
Description copied from interface:RTransactionRxReturns transactional object holder instance by name using provided codec for object.- Specified by:
getBucketin interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Bucket object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name)
Description copied from interface:RTransactionRxReturns transactional map instance by name.- Specified by:
getMapin interfaceRTransactionRx- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMapRx<K,V> getMap(String name, Codec codec)
Description copied from interface:RTransactionRxReturns transactional map instance by name using provided codec for both map keys and values.- Specified by:
getMapin interfaceRTransactionRx- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of objectcodec- - codec for keys and values- Returns:
- Map object
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RTransactionRxReturns transactional map-based cache instance bynameusing providedcodecfor 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
RTransactionRx.getMap(String, Codec).- Specified by:
getMapCachein interfaceRTransactionRx- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - object namecodec- - codec for keys and values- Returns:
- MapCache object
-
getMapCache
public <K,V> RMapCacheRx<K,V> getMapCache(String name)
Description copied from interface:RTransactionRxReturns 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
RTransactionRx.getMap(String).- Specified by:
getMapCachein interfaceRTransactionRx- Type Parameters:
K- type of keyV- type of value- Parameters:
name- - name of object- Returns:
- MapCache object
-
getSet
public <V> RSetRx<V> getSet(String name)
Description copied from interface:RTransactionRxReturns transactional set instance by name.- Specified by:
getSetin interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- Set object
-
getSet
public <V> RSetRx<V> getSet(String name, Codec codec)
Description copied from interface:RTransactionRxReturns transactional set instance by name using provided codec for set objects.- Specified by:
getSetin interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- Set object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name)
Description copied from interface:RTransactionRxReturns 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
RTransactionRx.getSet(String).- Specified by:
getSetCachein interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheRx<V> getSetCache(String name, Codec codec)
Description copied from interface:RTransactionRxReturns 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
RTransactionRx.getSet(String, Codec).- Specified by:
getSetCachein interfaceRTransactionRx- Type Parameters:
V- type of value- Parameters:
name- - name of objectcodec- - codec for values- Returns:
- SetCache object
-
commit
public io.reactivex.rxjava3.core.Completable commit()
Description copied from interface:RTransactionRxCommits all changes made on this transaction.- Specified by:
commitin interfaceRTransactionRx- Returns:
- void
-
rollback
public io.reactivex.rxjava3.core.Completable rollback()
Description copied from interface:RTransactionRxRollback all changes made on this transaction.- Specified by:
rollbackin interfaceRTransactionRx- Returns:
- void
-
-