diff --git a/src/main/java/org/redisson/Redisson.java b/src/main/java/org/redisson/Redisson.java index 773db9997..e2a15650d 100755 --- a/src/main/java/org/redisson/Redisson.java +++ b/src/main/java/org/redisson/Redisson.java @@ -61,6 +61,8 @@ import org.redisson.core.RSetCache; import org.redisson.core.RSortedSet; import org.redisson.core.RTopic; +import io.netty.util.concurrent.Future; + /** * Main infrastructure class allows to get access * to all Redisson objects on top of Redis server. @@ -174,7 +176,11 @@ public class Redisson implements RedissonClient { } public Map loadBucketValues(String ... keys) { - Collection values = commandExecutor.get(commandExecutor., Object>readAllAsync(RedisCommands.MGET, keys)); + if (config.isClusterConfig()) { + throw new IllegalStateException("This method can't be used in cluster mode!"); + } + Future> future = commandExecutor.readAsync(null, RedisCommands.MGET, keys); + List values = commandExecutor.get(future); Map result = new HashMap(values.size()); int index = 0; for (Object value : values) {