diff --git a/src/org/redkale/source/CacheMemorySource.java b/src/org/redkale/source/CacheMemorySource.java index 102508070..22e2bf8cd 100644 --- a/src/org/redkale/source/CacheMemorySource.java +++ b/src/org/redkale/source/CacheMemorySource.java @@ -454,6 +454,11 @@ public final class CacheMemorySource extends AbstractService i @Override public Map hmap(final String key, final Type type, int offset, int limit) { + return hmap(key, type, offset, limit, null); + } + + @Override + public Map hmap(final String key, final Type type, int offset, int limit, String pattern) { if (key == null) return new HashMap(); CacheEntry entry = container.get(key); if (entry == null || entry.isExpired() || entry.mapValue == null) return new HashMap(); @@ -606,6 +611,11 @@ public final class CacheMemorySource extends AbstractService i return CompletableFuture.supplyAsync(() -> hmap(key, type, offset, limit), getExecutor()); } + @Override + public CompletableFuture> hmapAsync(final String key, final Type type, int offset, int limit, String pattern) { + return CompletableFuture.supplyAsync(() -> hmap(key, type, offset, limit, pattern), getExecutor()); + } + @Override public CompletableFuture hgetAsync(final String key, final String field, final Type type) { return CompletableFuture.supplyAsync(() -> hget(key, field, type), getExecutor()); diff --git a/src/org/redkale/source/CacheSource.java b/src/org/redkale/source/CacheSource.java index 02e2f7125..61b4aa8f7 100644 --- a/src/org/redkale/source/CacheSource.java +++ b/src/org/redkale/source/CacheSource.java @@ -101,6 +101,8 @@ public interface CacheSource { public Map hmap(final String key, final Type type, int offset, int limit); + public Map hmap(final String key, final Type type, int offset, int limit, String pattern); + public T hget(final String key, final String field, final Type type); public String hgetString(final String key, final String field); @@ -336,6 +338,8 @@ public interface CacheSource { public CompletableFuture> hmapAsync(final String key, final Type type, int offset, int limit); + public CompletableFuture> hmapAsync(final String key, final Type type, int offset, int limit, String pattern); + public CompletableFuture hgetAsync(final String key, final String field, final Type type); public CompletableFuture hgetStringAsync(final String key, final String field);