Class RedissonTransaction

java.lang.Object
org.redisson.transaction.RedissonTransaction
All Implemented Interfaces:
RTransaction

public class RedissonTransaction extends Object implements RTransaction
Author:
Nikita Koksharov
  • Constructor Details

  • Method Details

    • getLocalCachedMap

      public <K, V> RLocalCachedMap<K,V> getLocalCachedMap(RLocalCachedMap<K,V> fromInstance)
      Description copied from interface: RTransaction
      Returns transactional local cached map proxy for specified local cached map instance.
      Specified by:
      getLocalCachedMap in interface RTransaction
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      fromInstance - - local cache map instance
      Returns:
      LocalCachedMap object
    • getBucket

      public <V> RBucket<V> getBucket(String name)
      Description copied from interface: RTransaction
      Returns transactional object holder instance by name.
      Specified by:
      getBucket in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Bucket object
    • getBucket

      public <V> RBucket<V> getBucket(String name, Codec codec)
      Description copied from interface: RTransaction
      Returns transactional object holder instance by name using provided codec for object.
      Specified by:
      getBucket in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for values
      Returns:
      Bucket object
    • getBuckets

      public RBuckets getBuckets()
      Description copied from interface: RTransaction
      Returns transactional interface for mass operations with Bucket objects.
      Specified by:
      getBuckets in interface RTransaction
      Returns:
      Buckets
    • getBuckets

      public RBuckets getBuckets(Codec codec)
      Description copied from interface: RTransaction
      Returns transactional interface for mass operations with Bucket objects using provided codec for object.
      Specified by:
      getBuckets in interface RTransaction
      Parameters:
      codec - - codec for bucket objects
      Returns:
      Buckets
    • getSet

      public <V> RSet<V> getSet(String name)
      Description copied from interface: RTransaction
      Returns transactional set instance by name.
      Specified by:
      getSet in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Set object
    • getSet

      public <V> RSet<V> getSet(String name, Codec codec)
      Description copied from interface: RTransaction
      Returns transactional set instance by name using provided codec for set objects.
      Specified by:
      getSet in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for values
      Returns:
      Set object
    • getSetCache

      public <V> RSetCache<V> getSetCache(String name)
      Description copied from interface: RTransaction
      Returns transactional set-based cache instance by name. Supports value eviction with a given TTL value.

      If eviction is not required then it's better to use regular map RTransaction.getSet(String).

      Specified by:
      getSetCache in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      SetCache object
    • getSetCache

      public <V> RSetCache<V> getSetCache(String name, Codec codec)
      Description copied from interface: RTransaction
      Returns transactional set-based cache instance by name. 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).

      Specified by:
      getSetCache in interface RTransaction
      Type Parameters:
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for values
      Returns:
      SetCache object
    • getMap

      public <K, V> RMap<K,V> getMap(String name)
      Description copied from interface: RTransaction
      Returns transactional map instance by name.
      Specified by:
      getMap in interface RTransaction
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      Map object
    • getMap

      public <K, V> RMap<K,V> getMap(String name, Codec codec)
      Description copied from interface: RTransaction
      Returns transactional map instance by name using provided codec for both map keys and values.
      Specified by:
      getMap in interface RTransaction
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      codec - - codec for keys and values
      Returns:
      Map object
    • getMapCache

      public <K, V> RMapCache<K,V> getMapCache(String name)
      Description copied from interface: RTransaction
      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 RTransaction.getMap(String).

      Specified by:
      getMapCache in interface RTransaction
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - name of object
      Returns:
      MapCache object
    • getMapCache

      public <K, V> RMapCache<K,V> getMapCache(String name, Codec codec)
      Description copied from interface: RTransaction
      Returns transactional map-based cache instance by 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 RTransaction.getMap(String, Codec).

      Specified by:
      getMapCache in interface RTransaction
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - - object name
      codec - - codec for keys and values
      Returns:
      MapCache object
    • commitAsync

      public RFuture<Void> commitAsync()
      Description copied from interface: RTransaction
      Commits all changes made on this transaction in async mode.
      Specified by:
      commitAsync in interface RTransaction
      Returns:
      void
    • commit

      public void commit()
      Description copied from interface: RTransaction
      Commits all changes made on this transaction.
      Specified by:
      commit in interface RTransaction
    • commit

      public void commit(Set<String> localCaches, List<TransactionalOperation> operations)
    • rollback

      public void rollback()
      Description copied from interface: RTransaction
      Rollback all changes made on this transaction.
      Specified by:
      rollback in interface RTransaction
    • rollback

      public void rollback(List<TransactionalOperation> operations)
    • rollbackAsync

      public RFuture<Void> rollbackAsync()
      Description copied from interface: RTransaction
      Rollback all changes made on this transaction in async mode.
      Specified by:
      rollbackAsync in interface RTransaction
      Returns:
      void
    • getLocalCaches

      public Set<String> getLocalCaches()
    • getOperations

      public List<TransactionalOperation> getOperations()
    • checkState

      protected void checkState()