Merge branch 'mrniko/master' into live-object

pull/527/head
jackygurui 9 years ago
commit 4b3bca2b7a

@ -2,6 +2,16 @@ Redisson Releases History
================================
####Please Note: trunk is current development branch.
####12-Jun-2016 - version 2.2.16 released
Feature - `RGeo`, `RMultimapCache` added to `RBatch`
Feature - `fastRemove` and `fastRemoveAsync` methods were added to `RList`
Improvement - added Spring 4.3.0 support to RedissonSpringCacheManager
Improvement - `RSortedSet` performance boost up to __x4__
Improvement - `RList.remove` optimization
Improvement - ability to define `Codec` for `RRemoteService`
Fixed - cluster state managing with redis masters only
Fixed - dead lock during `RLock`, `RSemaphore`, `RReadWriteLock`, `RCountDownLatch` usage under heavy load
####08-Jun-2016 - version 2.2.15 released
Improvement - Performance boost up to 30% for `RSortedSet.add` method
Fixed - auth during reconnection (thanks to fransiskusx)

@ -83,12 +83,12 @@ Include the following to your dependency list:
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>2.2.15</version>
<version>2.2.16</version>
</dependency>
### Gradle
compile 'org.redisson:redisson:2.2.15'
compile 'org.redisson:redisson:2.2.16'
### Supported by

@ -3,7 +3,7 @@
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>2.2.16-SNAPSHOT</version>
<version>2.2.17-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Redisson</name>

@ -16,9 +16,11 @@
package org.redisson.spring.cache;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
@ -38,6 +40,8 @@ import org.springframework.cache.support.SimpleValueWrapper;
*/
public class RedissonCache implements Cache {
private final ConcurrentMap<Object, Lock> valueLoaderLocks = new ConcurrentHashMap<Object, Lock>();
private RMapCache<Object, Object> mapCache;
private final RMap<Object, Object> map;
@ -126,8 +130,6 @@ public class RedissonCache implements Cache {
return new SimpleValueWrapper(value);
}
final Map<Object, Lock> valueLoaderLocks = new ConcurrentHashMap<Object, Lock>();
public Lock getLock(Object key) {
Lock lock = valueLoaderLocks.get(key);
if (lock == null) {
@ -152,7 +154,14 @@ public class RedissonCache implements Cache {
try {
value = toStoreValue(valueLoader.call());
} catch (Exception ex) {
throw new ValueRetrievalException(key, valueLoader, ex.getCause());
try {
Class<?> c = Class.forName("org.springframework.cache.Cache$ValueRetrievalException");
Constructor<?> constructor = c.getConstructor(Object.class, Callable.class, Throwable.class);
RuntimeException exception = (RuntimeException) constructor.newInstance(key, valueLoader, ex.getCause());
throw exception;
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
map.put(key, value);
}

Loading…
Cancel
Save