diff --git a/.classpath b/.classpath
index 4d236507f..bbf9837aa 100644
--- a/.classpath
+++ b/.classpath
@@ -8,31 +8,36 @@
+
-
+
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index be590e07c..b69a99a38 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,5 @@
#
-#Tue Dec 13 20:42:40 EET 2011
+#Fri Mar 30 10:10:50 EEST 2012
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
diff --git a/build.gradle b/build.gradle
index f0ab280eb..066c12d59 100644
--- a/build.gradle
+++ b/build.gradle
@@ -82,6 +82,7 @@ dependencies {
// Redis Drivers
compile "redis.clients:jedis:$jedisVersion"
+ compile "com.github.spullara.redis:client:$sredisVersion"
compile("org.jredis:jredis-anthonylauzon:$jredisVersion") { optional = true }
compile("org.idevlab:rjc:$rjcVersion") { optional = true }
diff --git a/gradle.properties b/gradle.properties
index f2e892a26..9faebb341 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -5,7 +5,7 @@ log4jVersion = 1.2.16
slf4jVersion = 1.6.4
# Common libraries
-springVersion = 3.1.0.RELEASE
+springVersion = 3.1.1.RELEASE
jacksonVersion = 1.8.6
# Testing
@@ -15,7 +15,8 @@ mockitoVersion = 1.8.5
# Drivers
jedisVersion = 2.0.0
jredisVersion = 03122010
-rjcVersion= 0.6.4
+rjcVersion = 0.6.4
+sredisVersion = 0.1
# Manifest properties
@@ -24,6 +25,7 @@ spring.range = "[3.1.0, 4.0.0)"
jedis.range = "[2.0.0, 2.0.0]"
jackson.range = "[1.6, 2.0.0)"
rjc.range = "[0.6.4, 0.6.4]"
+sredis.range = "[0.1, 1.0)"
# --------------------
# Project wide version
diff --git a/src/main/java/org/springframework/data/redis/connection/sredis/SRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/sredis/SRedisConnection.java
new file mode 100644
index 000000000..aa07fb1bd
--- /dev/null
+++ b/src/main/java/org/springframework/data/redis/connection/sredis/SRedisConnection.java
@@ -0,0 +1,1797 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.data.redis.connection.sredis;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.springframework.dao.DataAccessException;
+import org.springframework.data.redis.RedisConnectionFailureException;
+import org.springframework.data.redis.RedisSystemException;
+import org.springframework.data.redis.connection.DataType;
+import org.springframework.data.redis.connection.MessageListener;
+import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.connection.RedisSubscribedConnectionException;
+import org.springframework.data.redis.connection.SortParameters;
+import org.springframework.data.redis.connection.Subscription;
+
+import redis.client.RedisClient;
+import redis.client.RedisClient.Pipeline;
+import redis.client.RedisException;
+import redis.client.SocketPool;
+import redis.reply.MultiBulkReply;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * {@code RedisConnection} implementation on top of spullara Redis Protocol library.
+ *
+ * @author Costin Leau
+ */
+public class SRedisConnection implements RedisConnection {
+
+ private boolean isClosed = false;
+ private boolean isMulti = false;
+ private final RedisClient client;
+ private Pipeline pipeline;
+ private volatile SRedisSubscription subscription;
+
+ public SRedisConnection(SocketPool pool) {
+ try {
+ this.client = new RedisClient(pool);
+ } catch (IOException e) {
+ throw new RedisConnectionFailureException("Could not connect", e);
+ }
+ }
+
+ protected DataAccessException convertSRAccessException(Exception ex) {
+ if (ex instanceof RedisException) {
+ return SRedisUtils.convertSRedisAccessException((RedisException) ex);
+ }
+ if (ex instanceof IOException) {
+ return new RedisConnectionFailureException("Redis connection failed", (IOException) ex);
+ }
+
+ return new RedisSystemException("Unknown SRedis exception", ex);
+ }
+
+
+ public void close() throws DataAccessException {
+ isClosed = true;
+
+ try {
+ client.close();
+ } catch (IOException ex) {
+ throw convertSRAccessException(ex);
+ }
+ }
+
+ public boolean isClosed() {
+ return isClosed;
+ }
+
+ public RedisClient getNativeConnection() {
+ return client;
+ }
+
+
+ public boolean isQueueing() {
+ return isMulti;
+ }
+
+ public boolean isPipelined() {
+ return (pipeline != null);
+ }
+
+
+ public void openPipeline() {
+ if (pipeline == null) {
+ pipeline = client.pipeline();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public List