diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25005d1f8..2b9295791 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,26 @@ Redisson Releases History
================================
####Please Note: trunk is current development branch.
+####04-Mar-2016 - version 2.2.9 released
+
+Feature - __new object added__ `RSetMultimap`
+Feature - __new object added__ `RListMultimap`
+Feature - `valueRangeReversed` and `valueRangeReversedAsync` methods were added to `RScoredSortedSet` object
+Improvement - Throw `RedisOutOfMemoryException` when OOM error from Redis server has occured
+Improvement - Node type added to optimization in Cluster mode
+Improvement - Add DynamicImport-Package to OSGi headers
+Fixed - `RedissonSpringCacheManager` Sentinel compatibility
+Fixed - `RAtomicLong.compareAndSet` doesn't work when expected value is 0 and it wasn't initialized
+
+####12-Feb-2016 - version 2.2.8 released
+
+Feature - `union`, `unionAsync`, `readUnion` and `readUnionAsync` methods were added to `RSet` object
+Feature - `readAll` and `readAllAsync` methods were added to `RSetCache` object
+Improvement - `RKeys.delete` optimization in Cluster mode
+Fixed - Script error during `RSetCache.toArray` and `RSetCache.readAll` methods invocation
+Fixed - Sentinel doesn't support AUTH command
+Fixed - RMap iterator
+
####03-Feb-2016 - version 2.2.7 released
Feature - `readAllKeySet`, `readAllValues`, `readAllEntry`, `readAllKeySetAsync`, `readAllValuesAsync`, `readAllEntryAsync` methods were added to `RMap` object
diff --git a/README.md b/README.md
index 1a610d027..3bf37cb73 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
Redisson - distributed and scalable Java objects powered by Redis. Advanced Java Redis client
====
-[![Maven Central](https://img.shields.io/maven-central/v/org.redisson/redisson.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/org.redisson/redisson/) please take part in [Redisson survey](https://ru.surveymonkey.com/r/LP7RG8Q)
+[![Maven Central](https://img.shields.io/maven-central/v/org.redisson/redisson.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/org.redisson/redisson/)
+
+##Please take part in [Redisson survey](https://ru.surveymonkey.com/r/LP7RG8Q)
Use familiar Java data structures with power of [Redis](http://redis.io).
@@ -22,20 +24,18 @@ Features
* [AWS ElastiCache](https://aws.amazon.com/elasticache/) servers mode:
1. automatic new master server discovery
2. automatic new slave servers discovery
- 3. read data using slave servers, write data using master server
* Cluster servers mode:
- 1. automatic master and slave discovery
+ 1. automatic master and slave servers discovery
2. automatic new master server discovery
3. automatic new slave servers discovery
- 4. automatic slots change discovery
- 5. read data using slave servers, write data using master server
+ 4. automatic slave servers offline/online discovery
+ 5. automatic slots change discovery
* Sentinel servers mode:
1. automatic master and slave servers discovery
2. automatic new master server discovery
3. automatic new slave servers discovery
4. automatic slave servers offline/online discovery
5. automatic sentinel servers discovery
- 6. read data using slave servers, write data using master server
* Master with Slave servers mode: read data using slave servers, write data using master server
* Single server mode: read and write data using single server
* Lua scripting
@@ -72,30 +72,7 @@ Features
Projects using Redisson
================================
-Setronica: [setronica.com](http://setronica.com/)
-Monits: [monits.com](http://monits.com/)
-Brookhaven National Laboratory: [bnl.gov](http://bnl.gov/)
-Netflix Dyno client: [dyno] (https://github.com/Netflix/dyno)
-武林Q传: [nbrpg.com](http://www.nbrpg.com/)
-Ocous: [ocous.com](http://www.ocous.com/)
-Invaluable: [invaluable.com](http://www.invaluable.com/)
-
-Latest version changelog
-=================================
-####03-Feb-2016 - version 2.2.7 released
-
-Feature - `readAllKeySet`, `readAllValues`, `readAllEntry`, `readAllKeySetAsync`, `readAllValuesAsync`, `readAllEntryAsync` methods were added to `RMap` object
-Improvement - `RKeys.delete` optimization in Cluster mode
-Fixed - minimal connections amount initialization
-Fixed - `RKeys.deleteByPattern` throws an error in cluster mode
-Fixed - `RKeys.deleteAsync` throws error in Cluster mode
-Fixed - Redisson failed to start when one of sentinel servers is down
-Fixed - Redisson failed to start when there are no slaves in Sentinel mode
-Fixed - slave nodes up/down state discovery in Cluster mode
-Fixed - slave can stay freezed when it has been just added in Sentinel mode
-Fixed - offline slaves handling during Redisson start in Sentinel mode
-Fixed - `SELECT` command can't be executed in Sentinel mode
-Fixed - `database` setting removed from cluster config
+[Setronica](http://setronica.com/), [Monits](http://monits.com/), [Brookhaven National Laboratory](http://bnl.gov/), [Netflix Dyno client] (https://github.com/Netflix/dyno), [武林Q传](http://www.nbrpg.com/), [Ocous](http://www.ocous.com/), [Invaluable](http://www.invaluable.com/), [Clover](https://www.clover.com/)
### Maven
@@ -104,12 +81,12 @@ Include the following to your dependency list:
org.redisson
redisson
- 2.2.7
+ 2.2.9
### Gradle
- compile 'org.redisson:redisson:2.2.7'
+ compile 'org.redisson:redisson:2.2.9'
### Supported by
diff --git a/checkstyle.xml b/checkstyle.xml
index 580b8854e..20bda8834 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -127,7 +127,6 @@
-
diff --git a/pom.xml b/pom.xml
index 202b7c16b..2411aa90c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.redisson
redisson
- 2.2.8-SNAPSHOT
+ 2.2.10-SNAPSHOT
bundle
Redisson
@@ -364,6 +364,7 @@
${project.artifactId}
+ *
diff --git a/src/main/java/org/redisson/RedisNodes.java b/src/main/java/org/redisson/RedisNodes.java
index 7ffd68a4e..4c79e13e8 100644
--- a/src/main/java/org/redisson/RedisNodes.java
+++ b/src/main/java/org/redisson/RedisNodes.java
@@ -30,6 +30,7 @@ import org.redisson.connection.ConnectionListener;
import org.redisson.connection.ConnectionManager;
import org.redisson.connection.RedisClientEntry;
import org.redisson.core.Node;
+import org.redisson.core.NodeType;
import org.redisson.core.NodesGroup;
import io.netty.util.concurrent.Future;
@@ -44,6 +45,19 @@ public class RedisNodes implements NodesGroup {
this.connectionManager = connectionManager;
}
+ @Override
+ public Collection getNodes(NodeType type) {
+ Collection clients = (Collection) connectionManager.getClients();
+ List result = new ArrayList();
+ for (N node : clients) {
+ if (node.getType().equals(type)) {
+ result.add(node);
+ }
+ }
+ return result;
+ }
+
+
@Override
public Collection getNodes() {
return (Collection) connectionManager.getClients();
diff --git a/src/main/java/org/redisson/Redisson.java b/src/main/java/org/redisson/Redisson.java
index 493d922a1..f02e14c0d 100755
--- a/src/main/java/org/redisson/Redisson.java
+++ b/src/main/java/org/redisson/Redisson.java
@@ -53,6 +53,7 @@ import org.redisson.core.RHyperLogLog;
import org.redisson.core.RKeys;
import org.redisson.core.RLexSortedSet;
import org.redisson.core.RList;
+import org.redisson.core.RListMultimap;
import org.redisson.core.RLock;
import org.redisson.core.RMap;
import org.redisson.core.RMapCache;
@@ -64,6 +65,7 @@ import org.redisson.core.RScript;
import org.redisson.core.RSemaphore;
import org.redisson.core.RSet;
import org.redisson.core.RSetCache;
+import org.redisson.core.RSetMultimap;
import org.redisson.core.RSortedSet;
import org.redisson.core.RTopic;
@@ -244,11 +246,31 @@ public class Redisson implements RedissonClient {
return new RedissonList(codec, commandExecutor, name);
}
+ @Override
+ public RListMultimap getListMultimap(String name) {
+ return new RedissonListMultimap(commandExecutor, name);
+ }
+
+ @Override
+ public RListMultimap getListMultimap(String name, Codec codec) {
+ return new RedissonListMultimap(codec, commandExecutor, name);
+ }
+
@Override
public RMap getMap(String name) {
return new RedissonMap(commandExecutor, name);
}
+ @Override
+ public RSetMultimap getSetMultimap(String name) {
+ return new RedissonSetMultimap(commandExecutor, name);
+ }
+
+ @Override
+ public RSetMultimap getSetMultimap(String name, Codec codec) {
+ return new RedissonSetMultimap(codec, commandExecutor, name);
+ }
+
@Override
public RSetCache getSetCache(String name) {
return new RedissonSetCache(evictionScheduler, commandExecutor, name);
diff --git a/src/main/java/org/redisson/RedissonAtomicLong.java b/src/main/java/org/redisson/RedissonAtomicLong.java
index bdcd0f455..07bd7001f 100644
--- a/src/main/java/org/redisson/RedissonAtomicLong.java
+++ b/src/main/java/org/redisson/RedissonAtomicLong.java
@@ -57,11 +57,14 @@ public class RedissonAtomicLong extends RedissonExpirable implements RAtomicLong
@Override
public Future compareAndSetAsync(long expect, long update) {
return commandExecutor.evalWriteAsync(getName(), StringCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN,
- "if redis.call('get', KEYS[1]) == ARGV[1] then "
+ "local currValue = redis.call('get', KEYS[1]); "
+ + "if currValue == ARGV[1] "
+ + "or (tonumber(ARGV[1]) == 0 and currValue == false) then "
+ "redis.call('set', KEYS[1], ARGV[2]); "
+ "return 1 "
+ "else "
- + "return 0 end",
+ + "return 0 "
+ + "end",
Collections.