Package org.redisson

Class RedissonClientSideCaching

java.lang.Object
org.redisson.RedissonClientSideCaching
All Implemented Interfaces:
RClientSideCaching, RDestroyable

public final class RedissonClientSideCaching extends Object implements RClientSideCaching
Author:
Nikita Koksharov
  • Method Details

    • create

      public <T> T create(Object instance, Class<T> clazz)
    • getBucket

      public <V> RBucket<V> getBucket(String name)
      Description copied from interface: RClientSideCaching
      Returns object holder instance by name.
      Specified by:
      getBucket in interface RClientSideCaching
      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: RClientSideCaching
      Returns object holder instance by name using provided codec for object.
      Specified by:
      getBucket in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      Bucket object
    • getStream

      public <K, V> RStream<K,V> getStream(String name)
      Description copied from interface: RClientSideCaching
      Returns stream instance by name

      Requires Redis 5.0.0 and higher.

      Specified by:
      getStream in interface RClientSideCaching
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - of stream
      Returns:
      RStream object
    • getStream

      public <K, V> RStream<K,V> getStream(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns stream instance by name using provided codec for entries.

      Requires Redis 5.0.0 and higher.

      Specified by:
      getStream in interface RClientSideCaching
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of stream
      codec - codec for entry
      Returns:
      RStream object
    • getSet

      public <V> RSet<V> getSet(String name)
      Description copied from interface: RClientSideCaching
      Returns set instance by name.
      Specified by:
      getSet in interface RClientSideCaching
      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: RClientSideCaching
      Returns set instance by name using provided codec for set objects.
      Specified by:
      getSet in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      Set object
    • getMap

      public <K, V> RMap<K,V> getMap(String name)
      Description copied from interface: RClientSideCaching
      Returns map instance by name.

      NOTE: client side caching feature invalidates whole Map per entry change which is ineffective. Use local cached Map, JSON Store instead.

      Specified by:
      getMap in interface RClientSideCaching
      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: RClientSideCaching
      Returns map instance by name using provided codec for both map keys and values.

      NOTE: client side caching feature invalidates whole Map per entry change which is ineffective. Use local cached Map, JSON Store instead.

      Specified by:
      getMap in interface RClientSideCaching
      Type Parameters:
      K - type of key
      V - type of value
      Parameters:
      name - name of object
      codec - codec for keys and values
      Returns:
      Map object
    • getScoredSortedSet

      public <V> RScoredSortedSet<V> getScoredSortedSet(String name)
      Description copied from interface: RClientSideCaching
      Returns Redis Sorted Set instance by name. This sorted set sorts objects by object score.
      Specified by:
      getScoredSortedSet in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      ScoredSortedSet object
    • getScoredSortedSet

      public <V> RScoredSortedSet<V> getScoredSortedSet(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns Redis Sorted Set instance by name using provided codec for sorted set objects. This sorted set sorts objects by object score.
      Specified by:
      getScoredSortedSet in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      ScoredSortedSet object
    • getList

      public <V> RList<V> getList(String name)
      Description copied from interface: RClientSideCaching
      Returns list instance by name.
      Specified by:
      getList in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      List object
    • getList

      public <V> RList<V> getList(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns list instance by name using provided codec for list objects.
      Specified by:
      getList in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      List object
    • getQueue

      public <V> RQueue<V> getQueue(String name)
      Description copied from interface: RClientSideCaching
      Returns unbounded queue instance by name.
      Specified by:
      getQueue in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - of object
      Returns:
      queue object
    • getQueue

      public <V> RQueue<V> getQueue(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns unbounded queue instance by name using provided codec for queue objects.
      Specified by:
      getQueue in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for message
      Returns:
      Queue object
    • getDeque

      public <V> RDeque<V> getDeque(String name)
      Description copied from interface: RClientSideCaching
      Returns unbounded deque instance by name.
      Specified by:
      getDeque in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      Deque object
    • getDeque

      public <V> RDeque<V> getDeque(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns unbounded deque instance by name using provided codec for deque objects.
      Specified by:
      getDeque in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for values
      Returns:
      Deque object
    • getBlockingQueue

      public <V> RBlockingQueue<V> getBlockingQueue(String name)
      Description copied from interface: RClientSideCaching
      Returns unbounded blocking queue instance by name.
      Specified by:
      getBlockingQueue in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      BlockingQueue object
    • getBlockingQueue

      public <V> RBlockingQueue<V> getBlockingQueue(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns unbounded blocking queue instance by name using provided codec for queue objects.
      Specified by:
      getBlockingQueue in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of queue
      codec - queue objects codec
      Returns:
      BlockingQueue object
    • getBlockingDeque

      public <V> RBlockingDeque<V> getBlockingDeque(String name)
      Description copied from interface: RClientSideCaching
      Returns unbounded blocking deque instance by name.
      Specified by:
      getBlockingDeque in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      BlockingDeque object
    • getBlockingDeque

      public <V> RBlockingDeque<V> getBlockingDeque(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns unbounded blocking deque instance by name using provided codec for deque objects.
      Specified by:
      getBlockingDeque in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - deque objects codec
      Returns:
      BlockingDeque object
    • getGeo

      public <V> RGeo<V> getGeo(String name)
      Description copied from interface: RClientSideCaching
      Returns geospatial items holder instance by name.
      Specified by:
      getGeo in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      Returns:
      Geo object
    • getGeo

      public <V> RGeo<V> getGeo(String name, Codec codec)
      Description copied from interface: RClientSideCaching
      Returns geospatial items holder instance by name using provided codec for geospatial members.
      Specified by:
      getGeo in interface RClientSideCaching
      Type Parameters:
      V - type of value
      Parameters:
      name - name of object
      codec - codec for value
      Returns:
      Geo object
    • destroy

      public void destroy()
      Description copied from interface: RDestroyable
      Destroys object when it's not necessary anymore.
      Specified by:
      destroy in interface RDestroyable