diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12e129a7f..cbe876415 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,14 @@ Redisson Releases History
================================
####Please Note: trunk is current development branch.
+####19-Dec-2016 - versions 2.7.2 and 3.2.2 released
+
+Feature - `RList`, `RSet` and `RScoredSortedSet` implements `RSortable` interface with SORT command support
+Feature - `NodeAsync` interface
+Feature - `Node.info`, `Node.getNode` methods added
+Fixed - elements distribution of `RBlockingFairQueue` across consumers
+Fixed - `factory already defined` error during Redisson initialization under Apache Tomcat
+
####14-Dec-2016 - versions 2.7.1 and 3.2.1 released
Url format used in config files __has changed__. For example:
diff --git a/README.md b/README.md
index be7dfe544..f01263216 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,10 @@ Redis 2.8+ compatible.
| Stable Release Version | JDK Version compatibility | Release Date |
| ------------- | ------------- | ------------|
-| 3.2.1 | 1.8+ | 14.12.2016 |
-| 2.7.1 | 1.6+ | 14.12.2016 |
+| 3.2.2 | 1.8+ | 19.12.2016 |
+| 2.7.2 | 1.6+ | 19.12.2016 |
-__NOTE__: Both version lines have same features except `CompletionStage` interface support added in 3.x.x
+__NOTE__: Both version lines have same features except `CompletionStage` interface supported by 3.x.x line
Please read [documentation](https://github.com/redisson/redisson/wiki) for more details.
Redisson [releases history](https://github.com/redisson/redisson/blob/master/CHANGELOG.md)
@@ -74,7 +74,7 @@ Features
Who uses Redisson
================================
-[Infor](http://www.infor.com/), [New Relic Synthetics](https://newrelic.com/synthetics), [Singtel](http://singtel.com), [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/) , [Apache Karaf Decanter](https://karaf.apache.org/projects.html#decanter), [Atmosphere Framework](http://async-io.org/), [BrandsEye](http://brandseye.com), [Datorama](http://datorama.com/), [BrightCloud](http://brightcloud.com/), [Azar](http://azarlive.com/)
+[Baidu](http://baidu.com), [Infor](http://www.infor.com/), [New Relic Synthetics](https://newrelic.com/synthetics), [Singtel](http://singtel.com), [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/) , [Apache Karaf Decanter](https://karaf.apache.org/projects.html#decanter), [Atmosphere Framework](http://async-io.org/), [BrandsEye](http://brandseye.com), [Datorama](http://datorama.com/), [BrightCloud](http://brightcloud.com/), [Azar](http://azarlive.com/)
Articles
================================
@@ -95,23 +95,23 @@ Quick start
org.redisson
redisson
- 3.2.1
+ 3.2.2
org.redisson
redisson
- 2.7.1
+ 2.7.2
#### Gradle
// JDK 1.8+ compatible
- compile 'org.redisson:redisson:3.2.1'
+ compile 'org.redisson:redisson:3.2.2'
// JDK 1.6+ compatible
- compile 'org.redisson:redisson:2.7.1'
+ compile 'org.redisson:redisson:2.7.2'
#### Java
@@ -136,11 +136,11 @@ RExecutorService executor = redisson.getExecutorService("myExecutorService");
Downloads
===============================
-[Redisson 3.2.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=3.2.1&e=jar),
-[Redisson node 3.2.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=3.2.1&e=jar)
+[Redisson 3.2.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=3.2.2&e=jar),
+[Redisson node 3.2.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=3.2.2&e=jar)
-[Redisson 2.7.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=2.7.1&e=jar),
-[Redisson node 2.7.1](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=2.7.1&e=jar)
+[Redisson 2.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson&v=2.7.2&e=jar),
+[Redisson node 2.7.2](https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=org.redisson&a=redisson-all&v=2.7.2&e=jar)
### Supported by
diff --git a/redisson/src/main/java/org/redisson/RedissonBloomFilter.java b/redisson/src/main/java/org/redisson/RedissonBloomFilter.java
index 88cbf8daa..0818a0d92 100644
--- a/redisson/src/main/java/org/redisson/RedissonBloomFilter.java
+++ b/redisson/src/main/java/org/redisson/RedissonBloomFilter.java
@@ -35,7 +35,6 @@ import org.redisson.client.protocol.decoder.ObjectMapReplayDecoder;
import org.redisson.command.CommandBatchService;
import org.redisson.command.CommandExecutor;
-import io.netty.util.concurrent.Future;
import net.openhft.hashing.LongHashFunction;
/**
@@ -212,9 +211,19 @@ public class RedissonBloomFilter extends RedissonExpirable implements RBloomF
@Override
public boolean tryInit(long expectedInsertions, double falseProbability) {
+ if (falseProbability > 1) {
+ throw new IllegalArgumentException("Bloom filter false probability can't be greater than 1");
+ }
+ if (falseProbability < 0) {
+ throw new IllegalArgumentException("Bloom filter false probability can't be negative");
+ }
+
size = optimalNumOfBits(expectedInsertions, falseProbability);
+ if (size == 0) {
+ throw new IllegalArgumentException("Bloom filter calculated size is " + size);
+ }
if (size > MAX_SIZE) {
- throw new IllegalArgumentException("Bloom filter can't be greater than " + MAX_SIZE + ". But calculated size is " + size);
+ throw new IllegalArgumentException("Bloom filter size can't be greater than " + MAX_SIZE + ". But calculated size is " + size);
}
hashIterations = optimalNumOfHashFunctions(expectedInsertions, size);
diff --git a/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java b/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java
index 250e77003..92a83e3d0 100644
--- a/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java
+++ b/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java
@@ -110,23 +110,6 @@ public class RedissonLiveObjectService implements RLiveObjectService {
return ClassUtils.getField(proxied, "liveObjectLiveMap");
}
- @Override
- public T create(Class entityClass) {
- validateClass(entityClass);
- try {
- Class extends T> proxyClass = getProxyClass(entityClass);
- Object id = generateId(entityClass);
- T proxied = instantiateLiveObject(proxyClass, id);
- if (!getMap(proxied).fastPut("redisson_live_object", "1")) {
- throw new IllegalArgumentException("Object already exists");
- }
- return proxied;
- } catch (Exception ex) {
- unregisterClass(entityClass);
- throw ex instanceof RuntimeException ? (RuntimeException) ex : new RuntimeException(ex);
- }
- }
-
private Object generateId(Class entityClass) throws NoSuchFieldException {
String idFieldName = getRIdFieldName(entityClass);
RId annotation = entityClass
@@ -149,18 +132,6 @@ public class RedissonLiveObjectService implements RLiveObjectService {
}
}
- @Override
- public T getOrCreate(Class entityClass, K id) {
- try {
- T proxied = instantiateLiveObject(getProxyClass(entityClass), id);
- getMap(proxied).fastPut("redisson_live_object", "1");
- return proxied;
- } catch (Exception ex) {
- unregisterClass(entityClass);
- throw ex instanceof RuntimeException ? (RuntimeException) ex : new RuntimeException(ex);
- }
- }
-
@Override
public T attach(T detachedObject) {
validateDetached(detachedObject);
diff --git a/redisson/src/main/java/org/redisson/api/NodesGroup.java b/redisson/src/main/java/org/redisson/api/NodesGroup.java
index 79061af6c..ff77e7b75 100644
--- a/redisson/src/main/java/org/redisson/api/NodesGroup.java
+++ b/redisson/src/main/java/org/redisson/api/NodesGroup.java
@@ -45,7 +45,7 @@ public interface NodesGroup {
/**
* Get Redis node by address in format: host:port
*
- * @param address
+ * @param address of node
* @return node
*/
N getNode(String address);
diff --git a/redisson/src/main/java/org/redisson/api/RBloomFilter.java b/redisson/src/main/java/org/redisson/api/RBloomFilter.java
index b1bd46c5c..57295e3e1 100644
--- a/redisson/src/main/java/org/redisson/api/RBloomFilter.java
+++ b/redisson/src/main/java/org/redisson/api/RBloomFilter.java
@@ -18,8 +18,6 @@ package org.redisson.api;
/**
* Bloom filter based on 64-bit hash derived from 128-bit hash (xxHash + FarmHash).
*
- * Code parts from Guava BloomFilter
- *
* @author Nikita Koksharov
*
* @param - type of object
diff --git a/redisson/src/main/java/org/redisson/api/RLiveObjectService.java b/redisson/src/main/java/org/redisson/api/RLiveObjectService.java
index de0078c3b..db91ffb7c 100644
--- a/redisson/src/main/java/org/redisson/api/RLiveObjectService.java
+++ b/redisson/src/main/java/org/redisson/api/RLiveObjectService.java
@@ -26,16 +26,6 @@ package org.redisson.api;
*/
public interface RLiveObjectService {
- /**
- * Use {@link #persist(Object)} method instead
- *
- * @param entityClass Entity class
- * @param Entity type
- * @return Always returns a proxied object. Even it does not exist in redis.
- */
- @Deprecated
- T create(Class entityClass);
-
/**
* Finds the entity from Redis with the id.
*
@@ -57,18 +47,6 @@ public interface RLiveObjectService {
*/
T get(Class entityClass, K id);
- /**
- * Use {@link #persist(Object)} method instead
- *
- * @param entityClass Entity class
- * @param id identifier
- * @param Entity type
- * @param Key type
- * @return Always returns a proxied object. Even it does not exist in redis.
- */
- @Deprecated
- T getOrCreate(Class entityClass, K id);
-
/**
* Returns proxied object for the detached object. Discard all the
* field values already in the detached instance.
diff --git a/redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java b/redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java
index b7097e77e..aa227cc66 100644
--- a/redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java
+++ b/redisson/src/main/java/org/redisson/client/handler/CommandDecoder.java
@@ -300,7 +300,8 @@ public class CommandDecoder extends ReplayingDecoder {
decodeList(in, data, parts, channel, size, respParts);
} else {
- throw new IllegalStateException("Can't decode replay " + (char)code);
+ String dataStr = in.toString(0, in.writerIndex(), CharsetUtil.UTF_8);
+ throw new IllegalStateException("Can't decode replay: " + dataStr);
}
}
diff --git a/redisson/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java b/redisson/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java
index 99fd12958..1cfea6077 100644
--- a/redisson/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java
+++ b/redisson/src/main/java/org/redisson/spring/cache/RedissonSpringCacheManager.java
@@ -52,7 +52,13 @@ public class RedissonSpringCacheManager implements CacheManager, ResourceLoaderA
private String configLocation;
- public RedissonSpringCacheManager() {
+ /**
+ * Creates CacheManager supplied by Redisson instance
+ *
+ * @param redisson object
+ */
+ public RedissonSpringCacheManager(RedissonClient redisson) {
+ this(redisson, (String)null, null);
}
/**
diff --git a/redisson/src/test/java/org/redisson/RedissonBloomFilterTest.java b/redisson/src/test/java/org/redisson/RedissonBloomFilterTest.java
index 61f9addc9..3491d495e 100644
--- a/redisson/src/test/java/org/redisson/RedissonBloomFilterTest.java
+++ b/redisson/src/test/java/org/redisson/RedissonBloomFilterTest.java
@@ -7,6 +7,24 @@ import static org.assertj.core.api.Assertions.*;
public class RedissonBloomFilterTest extends BaseTest {
+ @Test(expected = IllegalArgumentException.class)
+ public void testFalseProbability1() {
+ RBloomFilter filter = redisson.getBloomFilter("filter");
+ filter.tryInit(1, -1);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testFalseProbability2() {
+ RBloomFilter filter = redisson.getBloomFilter("filter");
+ filter.tryInit(1, 2);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testSizeZero() {
+ RBloomFilter filter = redisson.getBloomFilter("filter");
+ filter.tryInit(1, 1);
+ }
+
@Test
public void testConfig() {
RBloomFilter filter = redisson.getBloomFilter("filter");