RKeysAsync interface added

pull/243/head
Nikita 10 years ago
parent fe069a600f
commit 5185aee75c

@ -2,14 +2,10 @@ package org.redisson.core;
import java.util.Collection;
import io.netty.util.concurrent.Future;
public interface RKeys {
public interface RKeys extends RKeysAsync {
String randomKey();
Future<String> randomKeyAsync();
/**
* Find keys by key search pattern
*
@ -23,19 +19,6 @@ public interface RKeys {
*/
Collection<String> findKeysByPattern(String pattern);
/**
* Find keys by key search pattern in async mode
*
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern
* @return
*/
Future<Collection<String>> findKeysByPatternAsync(String pattern);
/**
* Delete multiple objects by a key pattern
*
@ -49,19 +32,6 @@ public interface RKeys {
*/
long deleteByPattern(String pattern);
/**
* Delete multiple objects by a key pattern in async mode
*
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern
* @return
*/
Future<Long> deleteByPatternAsync(String pattern);
/**
* Delete multiple objects by name
*
@ -70,12 +40,4 @@ public interface RKeys {
*/
long delete(String ... keys);
/**
* Delete multiple objects by name in async mode
*
* @param keys - object names
* @return
*/
Future<Long> deleteAsync(String ... keys);
}

@ -0,0 +1,45 @@
package org.redisson.core;
import java.util.Collection;
import io.netty.util.concurrent.Future;
public interface RKeysAsync {
Future<String> randomKeyAsync();
/**
* Find keys by key search pattern in async mode
*
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern
* @return
*/
Future<Collection<String>> findKeysByPatternAsync(String pattern);
/**
* Delete multiple objects by a key pattern in async mode
*
* Supported glob-style patterns:
* h?llo subscribes to hello, hallo and hxllo
* h*llo subscribes to hllo and heeeello
* h[ae]llo subscribes to hello and hallo, but not hillo
*
* @param pattern
* @return
*/
Future<Long> deleteByPatternAsync(String pattern);
/**
* Delete multiple objects by name in async mode
*
* @param keys - object names
* @return
*/
Future<Long> deleteAsync(String ... keys);
}
Loading…
Cancel
Save