public class RedissonTransaction extends Object implements RTransaction
| Constructor and Description |
|---|
RedissonTransaction(CommandAsyncExecutor commandExecutor,
TransactionOptions options) |
RedissonTransaction(CommandAsyncExecutor commandExecutor,
TransactionOptions options,
List<TransactionalOperation> operations,
Set<String> localCaches) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkState() |
void |
commit()
Commits all changes made on this transaction.
|
void |
commit(Set<String> localCaches,
List<TransactionalOperation> operations) |
RFuture<Void> |
commitAsync()
Commits all changes made on this transaction in async mode.
|
protected static String |
generateId() |
<V> RBucket<V> |
getBucket(String name)
Returns transactional object holder instance by name.
|
<V> RBucket<V> |
getBucket(String name,
Codec codec)
Returns transactional object holder instance by name
using provided codec for object.
|
<K,V> RLocalCachedMap<K,V> |
getLocalCachedMap(RLocalCachedMap<K,V> fromInstance)
Returns transactional local cached map proxy for specified local cached map instance.
|
Set<String> |
getLocalCaches() |
<K,V> RMap<K,V> |
getMap(String name)
Returns transactional map instance by name.
|
<K,V> RMap<K,V> |
getMap(String name,
Codec codec)
Returns transactional map instance by name
using provided codec for both map keys and values.
|
<K,V> RMapCache<K,V> |
getMapCache(String name)
Returns transactional map-based cache instance by name.
|
<K,V> RMapCache<K,V> |
getMapCache(String name,
Codec codec)
Returns transactional map-based cache instance by
name
using provided codec for both cache keys and values. |
List<TransactionalOperation> |
getOperations() |
<V> RSet<V> |
getSet(String name)
Returns transactional set instance by name.
|
<V> RSet<V> |
getSet(String name,
Codec codec)
Returns transactional set instance by name
using provided codec for set objects.
|
<V> RSetCache<V> |
getSetCache(String name)
Returns transactional set-based cache instance by
name. |
<V> RSetCache<V> |
getSetCache(String name,
Codec codec)
Returns transactional set-based cache instance by
name. |
void |
rollback()
Rollback all changes made on this transaction.
|
void |
rollback(List<TransactionalOperation> operations) |
RFuture<Void> |
rollbackAsync()
Rollback all changes made on this transaction in async mode.
|
public RedissonTransaction(CommandAsyncExecutor commandExecutor, TransactionOptions options)
public RedissonTransaction(CommandAsyncExecutor commandExecutor, TransactionOptions options, List<TransactionalOperation> operations, Set<String> localCaches)
public <K,V> RLocalCachedMap<K,V> getLocalCachedMap(RLocalCachedMap<K,V> fromInstance)
RTransactiongetLocalCachedMap in interface RTransactionK - type of keyV - type of valuefromInstance - - local cache map instancepublic <V> RBucket<V> getBucket(String name)
RTransactiongetBucket in interface RTransactionV - type of valuename - - name of objectpublic <V> RBucket<V> getBucket(String name, Codec codec)
RTransactiongetBucket in interface RTransactionV - type of valuename - - name of objectcodec - - codec for valuespublic <V> RSet<V> getSet(String name)
RTransactiongetSet in interface RTransactionV - type of valuename - - name of objectpublic <V> RSet<V> getSet(String name, Codec codec)
RTransactiongetSet in interface RTransactionV - type of valuename - - name of objectcodec - - codec for valuespublic <V> RSetCache<V> getSetCache(String name)
RTransactionname.
Supports value eviction with a given TTL value.
If eviction is not required then it's better to use regular map RTransaction.getSet(String).
getSetCache in interface RTransactionV - type of valuename - - name of objectpublic <V> RSetCache<V> getSetCache(String name, Codec codec)
RTransactionname.
Supports value eviction with a given TTL value.
If eviction is not required then it's better to use regular map RTransaction.getSet(String, Codec).
getSetCache in interface RTransactionV - type of valuename - - name of objectcodec - - codec for valuespublic <K,V> RMap<K,V> getMap(String name)
RTransactiongetMap in interface RTransactionK - type of keyV - type of valuename - - name of objectpublic <K,V> RMap<K,V> getMap(String name, Codec codec)
RTransactiongetMap in interface RTransactionK - type of keyV - type of valuename - - name of objectcodec - - codec for keys and valuespublic <K,V> RMapCache<K,V> getMapCache(String name)
RTransaction
If eviction is not required then it's better to use regular map RTransaction.getMap(String).
getMapCache in interface RTransactionK - type of keyV - type of valuename - - name of objectpublic <K,V> RMapCache<K,V> getMapCache(String name, Codec codec)
RTransactionname
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 RTransaction.getMap(String, Codec).
getMapCache in interface RTransactionK - type of keyV - type of valuename - - object namecodec - - codec for keys and valuespublic RFuture<Void> commitAsync()
RTransactioncommitAsync in interface RTransactionpublic void commit()
RTransactioncommit in interface RTransactionpublic void commit(Set<String> localCaches, List<TransactionalOperation> operations)
protected static String generateId()
public void rollback()
RTransactionrollback in interface RTransactionpublic void rollback(List<TransactionalOperation> operations)
public RFuture<Void> rollbackAsync()
RTransactionrollbackAsync in interface RTransactionpublic List<TransactionalOperation> getOperations()
protected void checkState()
Copyright © 2014–2018 The Redisson Project. All rights reserved.