congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RedissonClient.getSetCache
Code IndexAdd Tabnine to your IDE (free)

How to use
getSetCache
method
in
org.redisson.api.RedissonClient

Best Java code snippets using org.redisson.api.RedissonClient.getSetCache (Showing top 4 results out of 315)

origin: redisson/redisson

Iterable<VIn> collection = null;
if (RSetCache.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
origin: redisson/redisson

Iterable<VIn> collection = null;
if (RSetCache.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
origin: org.redisson/redisson

Iterable<VIn> collection = null;
if (RSetCache.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
origin: redisson/redisson-examples

public static void main(String[] args) {
  // connects to 127.0.0.1:6379 by default
  RedissonClient redisson = Redisson.create();
  
  RSetCache<String> setCache = redisson.getSetCache("mySet");
  // with ttl = 20 seconds
  boolean isAdded = setCache.add("1", 20, TimeUnit.SECONDS);
  // store value permanently
  setCache.add("2");
  
  setCache.contains("1");
  
  for (String string : setCache) {
    // iteration through bulk loaded values
  }
  
  boolean removedValue = setCache.remove("1");
  setCache.removeAll(Arrays.asList("1", "2", "3"));
  setCache.containsAll(Arrays.asList("4", "1", "0"));
  
  RSet<String> secondsSet = redisson.getSet("mySecondsSet");
  secondsSet.add("4");
  secondsSet.add("5");
  Set<String> allValues = secondsSet.readAll();
  
  redisson.shutdown();
}

org.redisson.apiRedissonClientgetSetCache

Javadoc

Returns 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 #getSet(String,Codec).

Popular methods of RedissonClient

  • shutdown
    Shuts down Redisson instance but NOT Redis server Shutdown ensures that no tasks are submitted for '
  • getMap
    Returns map instance by name using provided codec for both map keys and values.
  • getLock
    Returns lock instance by name. Implements a non-fair locking so doesn't guarantees an acquire order
  • getTopic
    Returns topic instance by name using provided codec for messages.
  • getBucket
    Returns object holder instance by name using provided codec for object.
  • getConfig
    Allows to get configuration provided during Redisson instance creation. Further changes on this obje
  • getMapCache
    Returns map-based cache instance by name using provided codec for both cache keys and values. Suppor
  • getAtomicLong
    Returns atomicLong instance by name.
  • getKeys
    Returns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key
  • getScript
    Returns script operations object using provided codec.
  • getSemaphore
    Returns semaphore instance by name
  • getSet
    Returns set instance by name using provided codec for set objects.
  • getSemaphore,
  • getSet,
  • getBlockingQueue,
  • getList,
  • getScoredSortedSet,
  • getExecutorService,
  • getFairLock,
  • getQueue,
  • getReadWriteLock,
  • getListMultimap

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now