|
|
|
@ -17,6 +17,7 @@ package org.redisson.api;
|
|
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
@ -201,6 +202,60 @@ public interface RKeys extends RKeysAsync {
|
|
|
|
|
*/
|
|
|
|
|
Iterable<String> getKeys(int count);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all keys by pattern using Stream.
|
|
|
|
|
* Keys traversed with SCAN operation. Each SCAN operation loads
|
|
|
|
|
* up to <b>10</b> keys per request.
|
|
|
|
|
* <p>
|
|
|
|
|
* Supported glob-style patterns:
|
|
|
|
|
* <p>
|
|
|
|
|
* h?llo subscribes to hello, hallo and hxllo
|
|
|
|
|
* <p>
|
|
|
|
|
* h*llo subscribes to hllo and heeeello
|
|
|
|
|
* <p>
|
|
|
|
|
* h[ae]llo subscribes to hello and hallo, but not hillo
|
|
|
|
|
*
|
|
|
|
|
* @param pattern - match pattern
|
|
|
|
|
* @return Iterable object
|
|
|
|
|
*/
|
|
|
|
|
Stream<String> getKeysStreamByPattern(String pattern);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all keys by pattern using Stream.
|
|
|
|
|
* Keys traversed with SCAN operation. Each SCAN operation loads
|
|
|
|
|
* up to <code>count</code> keys per request.
|
|
|
|
|
* <p>
|
|
|
|
|
* Supported glob-style patterns:
|
|
|
|
|
* <p>
|
|
|
|
|
* h?llo subscribes to hello, hallo and hxllo
|
|
|
|
|
* <p>
|
|
|
|
|
* h*llo subscribes to hllo and heeeello
|
|
|
|
|
* <p>
|
|
|
|
|
* h[ae]llo subscribes to hello and hallo, but not hillo
|
|
|
|
|
*
|
|
|
|
|
* @param pattern - match pattern
|
|
|
|
|
* @param count - keys loaded per request to Redis
|
|
|
|
|
* @return Iterable object
|
|
|
|
|
*/
|
|
|
|
|
Stream<String> getKeysStreamByPattern(String pattern, int count);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all keys using Stream. Keys traversing with SCAN operation.
|
|
|
|
|
* Each SCAN operation loads up to <code>10</code> keys per request.
|
|
|
|
|
*
|
|
|
|
|
* @return Iterable object
|
|
|
|
|
*/
|
|
|
|
|
Stream<String> getKeysStream();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all keys using Stream. Keys traversing with SCAN operation.
|
|
|
|
|
* Each SCAN operation loads up to <code>count</code> keys per request.
|
|
|
|
|
*
|
|
|
|
|
* @param count - keys loaded per request to Redis
|
|
|
|
|
* @return Iterable object
|
|
|
|
|
*/
|
|
|
|
|
Stream<String> getKeysStream(int count);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get random key
|
|
|
|
|
*
|
|
|
|
|