public class RedissonTransactionRx extends Object implements RTransactionRx
Constructor and Description |
---|
RedissonTransactionRx(CommandRxExecutor executorService,
TransactionOptions options) |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Completable |
commit()
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 by
name
using provided codec for 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 by
name . |
<V> RSetCacheRx<V> |
getSetCache(String name,
Codec codec)
Returns transactional set-based cache instance by
name . |
io.reactivex.Completable |
rollback()
Rollback all changes made on this transaction.
|
public RedissonTransactionRx(CommandRxExecutor executorService, TransactionOptions options)
public <V> RBucketRx<V> getBucket(String name)
RTransactionRx
getBucket
in interface RTransactionRx
V
- type of valuename
- - name of objectpublic <V> RBucketRx<V> getBucket(String name, Codec codec)
RTransactionRx
getBucket
in interface RTransactionRx
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <K,V> RMapRx<K,V> getMap(String name)
RTransactionRx
getMap
in interface RTransactionRx
K
- type of keyV
- type of valuename
- - name of objectpublic <K,V> RMapRx<K,V> getMap(String name, Codec codec)
RTransactionRx
getMap
in interface RTransactionRx
K
- type of keyV
- type of valuename
- - name of objectcodec
- - codec for keys and valuespublic <K,V> RMapCacheRx<K,V> getMapCache(String name, Codec codec)
RTransactionRx
name
using provided codec
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 RTransactionRx.getMap(String, Codec)
.
getMapCache
in interface RTransactionRx
K
- type of keyV
- type of valuename
- - object namecodec
- - codec for keys and valuespublic <K,V> RMapCacheRx<K,V> getMapCache(String name)
RTransactionRx
If eviction is not required then it's better to use regular map RTransactionRx.getMap(String)
.
getMapCache
in interface RTransactionRx
K
- type of keyV
- type of valuename
- - name of objectpublic <V> RSetRx<V> getSet(String name)
RTransactionRx
getSet
in interface RTransactionRx
V
- type of valuename
- - name of objectpublic <V> RSetRx<V> getSet(String name, Codec codec)
RTransactionRx
getSet
in interface RTransactionRx
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic <V> RSetCacheRx<V> getSetCache(String name)
RTransactionRx
name
.
Supports value eviction with a given TTL value.
If eviction is not required then it's better to use regular map RTransactionRx.getSet(String)
.
getSetCache
in interface RTransactionRx
V
- type of valuename
- - name of objectpublic <V> RSetCacheRx<V> getSetCache(String name, Codec codec)
RTransactionRx
name
.
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)
.
getSetCache
in interface RTransactionRx
V
- type of valuename
- - name of objectcodec
- - codec for valuespublic io.reactivex.Completable commit()
RTransactionRx
commit
in interface RTransactionRx
public io.reactivex.Completable rollback()
RTransactionRx
rollback
in interface RTransactionRx
Copyright © 2014–2020 Redisson. All rights reserved.