You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cm...@apache.org on 2013/10/05 18:58:39 UTC

git commit: update Spring Redis 1.0.4.RELEASE to 1.1.0.RELEASE

Updated Branches:
  refs/heads/master df3679b1a -> ea959ce40


update Spring Redis 1.0.4.RELEASE to 1.1.0.RELEASE


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ea959ce4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ea959ce4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ea959ce4

Branch: refs/heads/master
Commit: ea959ce4060516ac458c7081d52b5a9a006d7679
Parents: df3679b
Author: cmueller <cm...@apache.org>
Authored: Sat Oct 5 18:58:28 2013 +0200
Committer: cmueller <cm...@apache.org>
Committed: Sat Oct 5 18:58:28 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/redis/RedisClient.java   | 6 +++---
 .../processor/idempotent/RedisIdempotentRepository.java      | 4 ++--
 .../java/org/apache/camel/component/redis/RedisSetTest.java  | 8 ++++----
 .../org/apache/camel/component/redis/RedisSortedSetTest.java | 4 ++--
 parent/pom.xml                                               | 2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ea959ce4/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisClient.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisClient.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisClient.java
index 0d7af9b..3613d6a 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisClient.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisClient.java
@@ -198,7 +198,7 @@ public class RedisClient {
         redisTemplate.watch(keys);
     }
 
-    public Boolean sadd(String key, Object value) {
+    public Long sadd(String key, Object value) {
         return redisTemplate.opsForSet().add(key, value);
     }
 
@@ -242,7 +242,7 @@ public class RedisClient {
         return redisTemplate.opsForSet().randomMember(key);
     }
 
-    public Boolean srem(String key, Object value) {
+    public Long srem(String key, Object value) {
         return redisTemplate.opsForSet().remove(key, value);
     }
 
@@ -442,7 +442,7 @@ public class RedisClient {
         return redisTemplate.opsForZSet().rank(key, value);
     }
 
-    public Boolean zrem(String key, Object value) {
+    public Long zrem(String key, Object value) {
         return redisTemplate.opsForZSet().remove(key, value);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ea959ce4/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
index 82dc57c..36c3c98 100755
--- a/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
+++ b/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/processor/idempotent/RedisIdempotentRepository.java
@@ -54,7 +54,7 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
 
     @ManagedOperation(description = "Adds the key to the store")
     public boolean add(String key) {
-        return setOperations.add(processorName, key);
+        return setOperations.add(processorName, key) != null;
     }
 
     @ManagedOperation(description = "Does the store contain the given key")
@@ -64,7 +64,7 @@ public class RedisIdempotentRepository extends ServiceSupport implements Idempot
 
     @ManagedOperation(description = "Remove the key from the store")
     public boolean remove(String key) {
-        return setOperations.remove(processorName, key);
+        return setOperations.remove(processorName, key) != null;
     }
 
     @ManagedAttribute(description = "The processor name")

http://git-wip-us.apache.org/repos/asf/camel/blob/ea959ce4/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSetTest.java b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSetTest.java
index d181c60..a528c08 100755
--- a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSetTest.java
+++ b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSetTest.java
@@ -54,7 +54,7 @@ public class RedisSetTest extends RedisTestSupport {
 
     @Test
     public void shouldExecuteSADD() throws Exception {
-        when(setOperations.add(anyString(), anyObject())).thenReturn(false);
+        when(setOperations.add(anyString(), anyObject())).thenReturn(null);
 
         Object result = sendHeaders(
                 RedisConstants.COMMAND, "SADD",
@@ -62,7 +62,7 @@ public class RedisSetTest extends RedisTestSupport {
                 RedisConstants.VALUE, "value");
 
         verify(setOperations).add("key", "value");
-        assertEquals(false, result);
+        assertEquals(null, result);
 
     }
 
@@ -212,7 +212,7 @@ public class RedisSetTest extends RedisTestSupport {
 
     @Test
     public void shouldExecuteSREM() throws Exception {
-        when(setOperations.remove(anyString(), anyObject())).thenReturn(true);
+        when(setOperations.remove(anyString(), anyObject())).thenReturn(Long.valueOf(1));
 
         Object result = sendHeaders(
                 RedisConstants.COMMAND, "SREM",
@@ -220,7 +220,7 @@ public class RedisSetTest extends RedisTestSupport {
                 RedisConstants.VALUE, "value");
 
         verify(setOperations).remove("key", "value");
-        assertEquals(true, result);
+        assertEquals(Long.valueOf(1), result);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/ea959ce4/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSortedSetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSortedSetTest.java b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSortedSetTest.java
index 43a6d14..5e209f8 100755
--- a/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSortedSetTest.java
+++ b/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis/RedisSortedSetTest.java
@@ -189,7 +189,7 @@ public class RedisSortedSetTest extends RedisTestSupport {
 
     @Test
     public void shouldExecuteZREM() {
-        when(zSetOperations.remove(anyString(), anyString())).thenReturn(true);
+        when(zSetOperations.remove(anyString(), anyString())).thenReturn(Long.valueOf(1));
 
         Object result = sendHeaders(
                 RedisConstants.COMMAND, "ZREM",
@@ -197,7 +197,7 @@ public class RedisSortedSetTest extends RedisTestSupport {
                 RedisConstants.VALUE, "value");
 
         verify(zSetOperations).remove("key", "value");
-        assertEquals(true, result);
+        assertEquals(Long.valueOf(1), result);
     }
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/ea959ce4/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index ce2aebb..a2146cf 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -361,7 +361,7 @@
     <spring-batch-version>2.2.2.RELEASE</spring-batch-version>
     <spring-castor-bundle-version>1.2.0</spring-castor-bundle-version>
     <spring-data-commons-version>1.5.0.RELEASE</spring-data-commons-version>
-    <spring-data-redis-version>1.0.4.RELEASE</spring-data-redis-version>
+    <spring-data-redis-version>1.1.0.RELEASE</spring-data-redis-version>
     <spring-integration-version>2.2.5.RELEASE</spring-integration-version>
     <spring-javaconfig-version>1.0.0-20090215</spring-javaconfig-version>
     <spring-ldap-version>1.3.1.RELEASE</spring-ldap-version>