Package org.redisson.reactive
Class RedissonTransactionReactive
- java.lang.Object
-
- org.redisson.reactive.RedissonTransactionReactive
-
- All Implemented Interfaces:
RTransactionReactive
public class RedissonTransactionReactive extends Object implements RTransactionReactive
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description RedissonTransactionReactive(CommandReactiveExecutor executorService, TransactionOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
commit()
Commits all changes made on this transaction.<V> RBucketReactive<V>
getBucket(String name)
Returns transactional object holder instance by name.<V> RBucketReactive<V>
getBucket(String name, Codec codec)
Returns transactional object holder instance by name using provided codec for object.<K,V>
RMapReactive<K,V>getMap(String name)
Returns transactional map instance by name.<K,V>
RMapReactive<K,V>getMap(String name, Codec codec)
Returns transactional map instance by name using provided codec for both map keys and values.<K,V>
RMapCacheReactive<K,V>getMapCache(String name)
Returns transactional map-based cache instance by name.<K,V>
RMapCacheReactive<K,V>getMapCache(String name, Codec codec)
Returns transactional map-based cache instance byname
using providedcodec
for both cache keys and values.<V> RSetReactive<V>
getSet(String name)
Returns transactional set instance by name.<V> RSetReactive<V>
getSet(String name, Codec codec)
Returns transactional set instance by name using provided codec for set objects.<V> RSetCacheReactive<V>
getSetCache(String name)
Returns transactional set-based cache instance byname
.<V> RSetCacheReactive<V>
getSetCache(String name, Codec codec)
Returns transactional set-based cache instance byname
.reactor.core.publisher.Mono<Void>
rollback()
Rollback all changes made on this transaction.
-
-
-
Constructor Detail
-
RedissonTransactionReactive
public RedissonTransactionReactive(CommandReactiveExecutor executorService, TransactionOptions options)
-
-
Method Detail
-
getBucket
public <V> RBucketReactive<V> getBucket(String name)
Description copied from interface:RTransactionReactive
Returns transactional object holder instance by name.- Specified by:
getBucket
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Bucket object
-
getBucket
public <V> RBucketReactive<V> getBucket(String name, Codec codec)
Description copied from interface:RTransactionReactive
Returns transactional object holder instance by name using provided codec for object.- Specified by:
getBucket
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Bucket object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name)
Description copied from interface:RTransactionReactive
Returns transactional map instance by name.- Specified by:
getMap
in interfaceRTransactionReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- Map object
-
getMap
public <K,V> RMapReactive<K,V> getMap(String name, Codec codec)
Description copied from interface:RTransactionReactive
Returns transactional map instance by name using provided codec for both map keys and values.- Specified by:
getMap
in interfaceRTransactionReactive
- 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> RMapCacheReactive<K,V> getMapCache(String name, Codec codec)
Description copied from interface:RTransactionReactive
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
RTransactionReactive.getMap(String, Codec)
.- Specified by:
getMapCache
in interfaceRTransactionReactive
- 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> RMapCacheReactive<K,V> getMapCache(String name)
Description copied from interface:RTransactionReactive
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
RTransactionReactive.getMap(String)
.- Specified by:
getMapCache
in interfaceRTransactionReactive
- Type Parameters:
K
- type of keyV
- type of value- Parameters:
name
- - name of object- Returns:
- MapCache object
-
getSet
public <V> RSetReactive<V> getSet(String name)
Description copied from interface:RTransactionReactive
Returns transactional set instance by name.- Specified by:
getSet
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- Set object
-
getSet
public <V> RSetReactive<V> getSet(String name, Codec codec)
Description copied from interface:RTransactionReactive
Returns transactional set instance by name using provided codec for set objects.- Specified by:
getSet
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- Set object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name)
Description copied from interface:RTransactionReactive
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
RTransactionReactive.getSet(String)
.- Specified by:
getSetCache
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of object- Returns:
- SetCache object
-
getSetCache
public <V> RSetCacheReactive<V> getSetCache(String name, Codec codec)
Description copied from interface:RTransactionReactive
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
RTransactionReactive.getSet(String, Codec)
.- Specified by:
getSetCache
in interfaceRTransactionReactive
- Type Parameters:
V
- type of value- Parameters:
name
- - name of objectcodec
- - codec for values- Returns:
- SetCache object
-
commit
public reactor.core.publisher.Mono<Void> commit()
Description copied from interface:RTransactionReactive
Commits all changes made on this transaction.- Specified by:
commit
in interfaceRTransactionReactive
- Returns:
- void
-
rollback
public reactor.core.publisher.Mono<Void> rollback()
Description copied from interface:RTransactionReactive
Rollback all changes made on this transaction.- Specified by:
rollback
in interfaceRTransactionReactive
- Returns:
- void
-
-