From 76ae4784a602e2d6cfaf2789eb26e597627c1c5c Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 5 Aug 2015 13:51:44 +0300 Subject: [PATCH] RBatch.getKeys added --- src/main/java/org/redisson/RedissonBatch.java | 9 +++++++-- src/main/java/org/redisson/core/RBatch.java | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/redisson/RedissonBatch.java b/src/main/java/org/redisson/RedissonBatch.java index f6c623292..2703f7600 100644 --- a/src/main/java/org/redisson/RedissonBatch.java +++ b/src/main/java/org/redisson/RedissonBatch.java @@ -24,6 +24,7 @@ import org.redisson.core.RBlockingQueueAsync; import org.redisson.core.RBucketAsync; import org.redisson.core.RDequeAsync; import org.redisson.core.RHyperLogLogAsync; +import org.redisson.core.RKeysAsync; import org.redisson.core.RListAsync; import org.redisson.core.RMapAsync; import org.redisson.core.RQueueAsync; @@ -35,10 +36,9 @@ import io.netty.util.concurrent.Future; public class RedissonBatch implements RBatch { - CommandBatchExecutorService executorService; + private final CommandBatchExecutorService executorService; public RedissonBatch(ConnectionManager connectionManager) { - super(); this.executorService = new CommandBatchExecutorService(connectionManager); } @@ -97,6 +97,11 @@ public class RedissonBatch implements RBatch { return new RedissonScript(executorService); } + @Override + public RKeysAsync getKeys() { + return new RedissonKeys(executorService); + } + @Override public List execute() { return executorService.execute(); diff --git a/src/main/java/org/redisson/core/RBatch.java b/src/main/java/org/redisson/core/RBatch.java index e70434c20..31c895e98 100644 --- a/src/main/java/org/redisson/core/RBatch.java +++ b/src/main/java/org/redisson/core/RBatch.java @@ -120,6 +120,14 @@ public interface RBatch { */ RScriptAsync getScript(); + /** + * Returns keys operations. + * Each of Redis/Redisson object associated with own key + * + * @return + */ + RKeysAsync getKeys(); + /** * Executes all operations accumulated during async methods invocations. *