Search in sources :

Example 1 with DelegateDecoderCodec

use of org.redisson.client.codec.DelegateDecoderCodec in project redisson by redisson.

the class RedissonBuckets method get.

@Override
public <V> Map<String, V> get(String... keys) {
    if (keys.length == 0) {
        return Collections.emptyMap();
    }
    RedisCommand<Map<Object, Object>> command = new RedisCommand<Map<Object, Object>>("MGET", new MapGetAllDecoder(Arrays.<Object>asList(keys), 0), ValueType.OBJECTS);
    RFuture<Map<String, V>> future = commandExecutor.readAsync(keys[0], new DelegateDecoderCodec(codec), command, keys);
    return commandExecutor.get(future);
}
Also used : RedisCommand(org.redisson.client.protocol.RedisCommand) MapGetAllDecoder(org.redisson.connection.decoder.MapGetAllDecoder) DelegateDecoderCodec(org.redisson.client.codec.DelegateDecoderCodec) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 DelegateDecoderCodec (org.redisson.client.codec.DelegateDecoderCodec)1 RedisCommand (org.redisson.client.protocol.RedisCommand)1 MapGetAllDecoder (org.redisson.connection.decoder.MapGetAllDecoder)1