+ upgrade some libraries

+ update changelog
DATAREDIS-37
This commit is contained in:
Costin Leau
2011-10-19 16:18:21 +03:00
parent 7018ecc61e
commit 0795f55e4d
7 changed files with 52 additions and 28 deletions

View File

@@ -6,24 +6,25 @@
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-core-asl/sources/jackson-core-asl-1.8.5-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-core-asl/jars/jackson-core-asl-1.8.5.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-context/sources/spring-context-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-context/jars/spring-context-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-beans/sources/spring-beans-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-beans/jars/spring-beans-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-log4j12/sources/slf4j-log4j12-1.6.1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/sources/jackson-mapper-asl-1.8.5-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/jars/jackson-mapper-asl-1.8.5.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/log4j/log4j/sources/log4j-1.2.16-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/log4j/log4j/bundles/log4j-1.2.16.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.idevlab/rjc/sources/rjc-0.6.4-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.idevlab/rjc/bundles/rjc-0.6.4.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.jredis/jredis-anthonylauzon/sources/jredis-anthonylauzon-03122010-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.jredis/jredis-anthonylauzon/jars/jredis-anthonylauzon-03122010.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-core-asl/sources/jackson-core-asl-1.8.3-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-core-asl/jars/jackson-core-asl-1.8.3.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/aopalliance/aopalliance/sources/aopalliance-1.0-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/aopalliance/aopalliance/jars/aopalliance-1.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-api/sources/slf4j-api-1.6.1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.6.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/xpp3/xpp3_min/sources/xpp3_min-1.1.4c-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/xpp3/xpp3_min/jars/xpp3_min-1.1.4c.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-expression/sources/spring-expression-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-expression/jars/spring-expression-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-test/sources/spring-test-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-test/jars/spring-test-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-aop/sources/spring-aop-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-aop/jars/spring-aop-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/sources/jackson-mapper-asl-1.8.3-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/jars/jackson-mapper-asl-1.8.3.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/redis.clients/jedis/sources/jedis-2.0.0-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/redis.clients/jedis/jars/jedis-2.0.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/jcl-over-slf4j/sources/jcl-over-slf4j-1.6.3-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.6.3.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-log4j12/sources/slf4j-log4j12-1.6.3-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.3.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/commons-pool/commons-pool/sources/commons-pool-1.5.6-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/commons-pool/commons-pool/jars/commons-pool-1.5.6.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-oxm/sources/spring-oxm-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-oxm/jars/spring-oxm-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-core/sources/spring-core-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-core/jars/spring-core-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-api/sources/slf4j-api-1.6.3-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.6.3.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-tx/sources/spring-tx-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-tx/jars/spring-tx-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-context-support/sources/spring-context-support-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-context-support/jars/spring-context-support-3.1.0.RC1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/javax.annotation/jsr250-api/sources/jsr250-api-1.0-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/javax.annotation/jsr250-api/jars/jsr250-api-1.0.jar" exported="true"/>
@@ -32,7 +33,6 @@
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.mockito/mockito-all/sources/mockito-all-1.8.5-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.mockito/mockito-all/jars/mockito-all-1.8.5.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/junit/junit/sources/junit-4.8.1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/junit/junit/jars/junit-4.8.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/commons-lang/commons-lang/sources/commons-lang-2.5-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/commons-lang/commons-lang/jars/commons-lang-2.5.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.slf4j/jcl-over-slf4j/sources/jcl-over-slf4j-1.6.1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.6.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/commons-logging/commons-logging/sources/commons-logging-1.1.1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/costin/.gradle/cache/org.springframework/spring-asm/sources/spring-asm-3.1.0.RC1-sources.jar" kind="lib" path="C:/Users/costin/.gradle/cache/org.springframework/spring-asm/jars/spring-asm-3.1.0.RC1.jar" exported="true"/>
</classpath>

View File

@@ -1,12 +1,13 @@
#Wed Oct 12 13:47:40 EEST 2011
#
#Wed Oct 19 16:15:43 EEST 2011
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@@ -3,9 +3,25 @@ SPRING DATA REDIS INTEGRATION CHANGELOG
http://www.springsource.org/spring-data
Changes in version 1.0.0.RC1 (2011-mm-dd)
Changes in version 1.0.0.RC1 (2011-10-19)
----------------------------------------
General
* Upgraded to Spring Framework 3.1 RC1
* Upgraded slfj, Jackson libraries
* Changed compile source/target compatibility to JDK 1.5
Package o.s.d.redis.connection
* Added equals/hashCode/compareTo methods to TypedTuple
Package o.s.d.redis.core
* Fixed potential bug in RedisTemplate#sort
* Added equals/hashCode/compareTo methods to TypedTuple
Package o.s.d.redis.support
* Fixed potential bug in RedisProperties
* Improved Redis cache implementation under heavy concurrent access
Changes in version 1.0.0.M4 (2011-07-18)
----------------------------------------

View File

@@ -2,11 +2,11 @@
# Logging
log4jVersion = 1.2.16
slf4jVersion = 1.6.1
slf4jVersion = 1.6.3
# Common libraries
springVersion = 3.1.0.RC1
jacksonVersion = 1.8.3
jacksonVersion = 1.8.5
# Testing
junitVersion = 4.8.1

View File

@@ -30,7 +30,10 @@ import org.springframework.data.redis.core.RedisOperations;
/**
* Default implementation for {@link RedisMap}.
*
*
* Note that the current implementation doesn't provide the same locking semantics across all methods.
* In highly concurrent environments, race conditions might appear.
*
* @author Costin Leau
*/
public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
@@ -196,7 +199,7 @@ public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
@Override
public V putIfAbsent(K key, V value) {
throw new UnsupportedOperationException();
return (hashOps.putIfAbsent(key, value) ? null : get(key));
// RedisOperations<String, ?> ops = hashOps.getOperations();
//

View File

@@ -252,7 +252,7 @@ public class RedisProperties extends Properties implements RedisMap<Object, Obje
@Override
public Object putIfAbsent(Object key, Object value) {
throw new UnsupportedOperationException();
return (hashOps.putIfAbsent((String) key, (String) value) ? null : get(key));
}
@Override

View File

@@ -15,10 +15,17 @@
*/
package org.springframework.data.redis.support.collections;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.junit.Assume.*;
import static org.junit.matchers.JUnitMatchers.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
import static org.junit.matchers.JUnitMatchers.hasItem;
import static org.junit.matchers.JUnitMatchers.hasItems;
import java.util.ArrayList;
import java.util.Collection;
@@ -42,9 +49,6 @@ import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.support.collections.DefaultRedisMap;
import org.springframework.data.redis.support.collections.RedisMap;
import org.springframework.data.redis.support.collections.RedisStore;
/**
* Integration test for Redis Map.
@@ -355,7 +359,7 @@ public abstract class AbstractRedisMapTests<K, V> {
}
@Test(expected = UnsupportedOperationException.class)
//@Test(expected = UnsupportedOperationException.class)
public void testConcurrentPutIfAbsent() {
K k1 = getKey();
K k2 = getKey();