Codota Logo
RedissonClient.getSet
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain RedissonClient
private void myMethod () {
RedissonClient r =
  • Codota IconConfig config;Redisson.create(config)
  • Codota IconRedisson.create()
  • Smart code suggestions by Codota
}
origin: redisson/redisson

private RSet<String> getPrincipalSet(String indexValue) {
  String principalKey = getPrincipalKey(indexValue);
  return redisson.getSet(principalKey, StringCodec.INSTANCE);
}
origin: redisson/redisson

  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
} else if (RSortedSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSortedSet(objectName, codec);
origin: redisson/redisson

private RSet<String> getPrincipalSet(String indexValue) {
  String principalKey = getPrincipalKey(indexValue);
  return redisson.getSet(principalKey, StringCodec.INSTANCE);
}
origin: redisson/redisson

  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
} else if (RSortedSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSortedSet(objectName, codec);
origin: org.hswebframework/hsweb-task-cluster

@Override
public <T> Set<T> getSet(String name) {
  return redissonClient.getSet(prefix + name);
}
origin: org.redisson/redisson

  collection = redisson.getSetCache(objectName, codec);
} else if (RSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSet(objectName, codec);
} else if (RSortedSet.class.isAssignableFrom(objectClass)) {
  collection = redisson.getSortedSet(objectName, codec);
origin: yangwenjie88/delay-queue

/**
 * 获取set对象
 *
 * @param <V>        the type parameter
 * @param objectName the object name
 * @return the r set
 */
public static <V> RSet<V> getSet(String objectName){
  return redissonClient.getSet(objectName);
}
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();
}

origin: org.redisson/redisson

private RSet<String> getPrincipalSet(String indexValue) {
  String principalKey = getPrincipalKey(indexValue);
  return redisson.getSet(principalKey, StringCodec.INSTANCE);
}
origin: huangjian888/jeeweb-mybatis-springboot

public boolean sdel(String key, Serializable value) {
  return redissonClient.getSet(key).remove(value);
}
origin: huangjian888/jeeweb-mybatis-springboot

public void sadd(String key, Serializable value) {
  redissonClient.getSet(key).add(value);
}
origin: huangjian888/jeeweb-mybatis-springboot

public Set<Object> sall(String key) {
  return redissonClient.getSet(key).readAll();
}
origin: stackoverflow.com

 public static void main(String[] args) {
  Config conf = new Config();
  conf.useSingleServer().setAddress(host + ":" + port);

  RedissonClient redisson = Redisson.create(conf);
  RSet<String> set = redisson.getSet(KEY)
  for (String s : set.readAllValues()) {
    System.out.println(s);
  }
  redisson.shutdown();
}
origin: redisson/redisson-examples

RSet<String> set = redisson.getSet("mySet");
set.add("1");
set.add("2");
String randomValue = set.random();
RSet<String> secondsSet = redisson.getSet("mySecondsSet");
secondsSet.add("4");
secondsSet.add("5");
org.redisson.apiRedissonClientgetSet

Javadoc

Returns set instance by name.

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
  • getBlockingQueue
    Returns unbounded blocking queue instance by name using provided codec for queue objects.
  • getSemaphore,
  • getBlockingQueue,
  • getList,
  • getScoredSortedSet,
  • getExecutorService,
  • getFairLock,
  • getQueue,
  • getReadWriteLock,
  • getListMultimap

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Notification (javax.management)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now