Merge branch 'master' into 3.0.0

pull/1833/head
Nikita Koksharov 6 years ago
commit 95576271c3

@ -3,6 +3,11 @@ Have at least a local copy of built redis, for more information see [tutorial](h
Note that redis shouldn't be running - the build will start instances as needed.
## Choosing the building branch
Prior to the build, you may need to change branch depending on which version of Redisson you want to build. Currently master branch is for version 2.x whereas 3.0.0 branch is for 3.x branch. Version 2.x requies Java SDK 6 and above and version 3.x requires Java SDK 8 and above to build.
## Running the tests ##
``` bash

@ -32,6 +32,7 @@ import org.redisson.client.codec.Codec;
import org.redisson.config.Config;
/**
* Redisson object factory used to register instance in JNDI registry.
*
* @author Nikita Koksharov
*

@ -699,7 +699,7 @@ public class BaseTransactionalMap<K, V> {
}
}
RFuture<Map<K, V>> future = ((RedissonMap<K, V>)map).getAllOperationAsync(keysToLoad);
RFuture<Map<K, V>> future = ((RedissonMap<K, V>)this.map).getAllOperationAsync(keysToLoad);
future.addListener(new FutureListener<Map<K, V>>() {
@Override
public void operationComplete(Future<Map<K, V>> future) throws Exception {

@ -2,7 +2,9 @@ package org.redisson.transaction;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -45,6 +47,19 @@ public abstract class RedissonBaseTransactionalMapTest extends BaseTest {
assertThat(m.size()).isZero();
}
@Test
public void testGetAll() {
RMap<String, String> m = getMap();
m.put("1", "2");
m.put("3", "4");
RTransaction t = redisson.createTransaction(TransactionOptions.defaults());
RMap<String, String> map = getTransactionalMap(t);
assertThat(map.getAll(new HashSet<String>(Arrays.asList("1", "3"))).values()).containsOnly("2", "4");
t.commit();
}
@Test
public void testFastPut() throws InterruptedException {
ExecutorService executor = Executors.newFixedThreadPool(2000);

Loading…
Cancel
Save