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

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

Best Java code snippets using org.redisson.api.RedissonClient.getKeys (Showing top 20 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: debop/hibernate-redis

public void flushDb() {
 log.info("flush db...");
 redisson.getKeys().flushdb();
}
origin: youngMen1/JAVA-

public final String type(final String key) {
  RType type = redissonClient.getKeys().getType(key);
  if (type == null) {
    return null;
  }
  return type.getClass().getName();
}
origin: huangjian888/jeeweb-mybatis-springboot

@Override
public final String type(final String key) {
  RType type = redissonClient.getKeys().getType(key);
  if (type == null) {
    return null;
  }
  return type.getClass().getName();
}
origin: debop/hibernate-redis

public long dbSize() {
 return redisson.getKeys().count();
}
origin: debop/hibernate-redis

public long dbSize() {
 return redisson.getKeys().count();
}
origin: huangjian888/jeeweb-mybatis-springboot

@Override
public final void delAll(final String pattern) {
  redissonClient.getKeys().deleteByPattern(pattern);
}
origin: debop/hibernate-redis

public void flushDb() {
 log.info("flush db...");
 redisson.getKeys().flushdb();
}
origin: com.github.debop/hibernate-redis

public void flushDb() {
 log.info("flush db...");
 redisson.getKeys().flushdb();
}
origin: youngMen1/JAVA-

public final void del(final String key) {
  redissonClient.getKeys().deleteAsync(key);
}
origin: youngMen1/JAVA-

public final void delAll(final String pattern) {
  redissonClient.getKeys().deleteByPattern(pattern);
}
origin: huangjian888/jeeweb-mybatis-springboot

@Override
public final void del(final String key) {
  redissonClient.getKeys().delete(key);
}
origin: tywo45/t-io

@Override
public void clear() {
  long start = SystemTimer.currTime;
  RKeys keys = redisson.getKeys();
  //		keys.deleteByPattern(keyPrefix(cacheName) + "*");
  keys.deleteByPatternAsync(keyPrefix(cacheName) + "*");
  long end = SystemTimer.currTime;
  long iv = end - start;
  log.info("clear cache {}, cost {}ms", cacheName, iv);
}
origin: locationtech/geowave

private void deleteByPattern(final String pattern) {
 final RKeys keySet = client.getKeys();
 keySet.getKeysByPattern(pattern).forEach(k -> keySet.delete(k));
}
origin: tywo45/t-io

@Override
public Iterable<String> keys() {
  RKeys keys = redisson.getKeys();
  Iterable<String> allkey = keys.getKeysByPattern(keyPrefix(cacheName) + "*");//.findKeysByPattern(keyPrefix(cacheName) + "*");
  return allkey;
}
origin: justlive1/earth-frost

private void waitFor(String uuid, int subscribers) {
 RSemaphore semaphore = redissonClient.getSemaphore(String.format(JobConfig.WORKER_REQ, uuid));
 try {
  semaphore.tryAcquire(subscribers, 10L, TimeUnit.SECONDS);
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
 redissonClient.getKeys().delete(semaphore);
}
origin: locationtech/geowave

public static Set<ByteArray> getPartitions(
  final RedissonClient client,
  final String setNamePrefix) {
 return Streams.stream(client.getKeys().getKeysByPattern(setNamePrefix + "*")).map(
   str -> str.length() > (setNamePrefix.length() + 1)
     ? new ByteArray(
       ByteArrayUtils.byteArrayFromString(str.substring(setNamePrefix.length() + 1)))
     : new ByteArray()).collect(Collectors.toSet());
}
origin: youngMen1/JAVA-

public Set<Object> getAll(String pattern) {
  Set<Object> set = InstanceUtil.newHashSet();
  Iterable<String> keys = redissonClient.getKeys().getKeysByPattern(pattern);
  for (Iterator<String> iterator = keys.iterator(); iterator.hasNext();) {
    String key = iterator.next();
    set.add(getRedisBucket(key).get());
  }
  return set;
}
origin: huangjian888/jeeweb-mybatis-springboot

@Override
public Set<Object> getAll(String pattern) {
  Set<Object> set = ArrayUtils.newHashSet();
  Iterable<String> keys = redissonClient.getKeys().getKeysByPattern(pattern);
  for (String key : keys) {
    set.add(getRedisBucket(key).get());
  }
  return set;
}
origin: huangjian888/jeeweb-mybatis-springboot

@Override
public Set<Object> getAll(String pattern, Integer expire) {
  Set<Object> set = ArrayUtils.newHashSet();
  Iterable<String> keys = redissonClient.getKeys().getKeysByPattern(pattern);
  for (String key : keys) {
    RBucket<Object> bucket = getRedisBucket(key);
    expire(bucket, expire);
    set.add(bucket.get());
  }
  return set;
}
origin: getheimdall/heimdall

/**
 * Clears a cache if it exists
 *
 * @param cacheName Cache name provided
 */
public void cacheClearInterceptor(String cacheName) {
  RedissonClient redisson = (RedissonClient) BeanManager.getBean(RedissonClient.class);
  RequestContext context = RequestContext.getCurrentContext();
  redisson.getKeys().deleteByPattern(createDeleteCacheKey(context, cacheName));
}
org.redisson.apiRedissonClientgetKeys

Javadoc

Returns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key

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

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTextField (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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