Merge branch 'master' into 3.0.0

pull/1303/head
Nikita 7 years ago
commit cabdec982d

@ -129,6 +129,17 @@
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.21.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<directory>target</directory>

@ -87,12 +87,10 @@
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>de.ruedigermoeller</groupId>

@ -34,45 +34,37 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>4.1.20.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.1.20.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.20.Final</version>
</dependency>
<dependency>

@ -22,6 +22,7 @@ import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -679,6 +680,10 @@ public class RedissonLocalCachedMap<K, V> extends RedissonMap<K, V> implements R
@Override
public RFuture<Map<K, V>> getAllAsync(Set<K> keys) {
if (keys.isEmpty()) {
return newSucceededFuture(Collections.<K, V>emptyMap());
}
final Map<K, V> result = new HashMap<K, V>();
Set<K> mapKeys = new HashSet<K>(keys);
for (Iterator<K> iterator = mapKeys.iterator(); iterator.hasNext();) {

@ -812,6 +812,33 @@ public abstract class BaseMapTest extends BaseTest {
assertThat(filtered.entrySet()).containsExactlyElementsOf(expectedMap.entrySet());
}
@Test
public void testGetAllOrderPartially() {
RMap<Integer, Integer> map = getMap("getAll");
map.put(1, 100);
map.put(2, 200);
map.put(3, 300);
map.put(4, 400);
RMap<Integer, Integer> map2 = getMap("getAll");
map2.put(5, 500);
map2.put(6, 600);
map2.put(7, 700);
map2.put(8, 800);
Map<Integer, Integer> filtered = map.getAll(new HashSet<Integer>(Arrays.asList(2, 3, 5, 1, 7, 8)));
Map<Integer, Integer> expectedMap = new LinkedHashMap<Integer, Integer>();
expectedMap.put(1, 100);
expectedMap.put(2, 200);
expectedMap.put(3, 300);
expectedMap.put(5, 500);
expectedMap.put(7, 700);
expectedMap.put(8, 800);
assertThat(filtered.entrySet()).containsExactlyElementsOf(expectedMap.entrySet());
}
@Test
public void testAddAndGet() throws InterruptedException {
RMap<Integer, Integer> map = getMap("getAll");

Loading…
Cancel
Save