Tabnine Logo
RedissonClient.getKeys
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • getSystemService (Context)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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