diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/DataType.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/DataType.java similarity index 95% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/DataType.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/DataType.java index ce095c327..c2ae95046 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/DataType.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/DataType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; import java.util.EnumSet; import java.util.Map; diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisCommands.java similarity index 95% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisCommands.java index 8e1620430..6bf79f7d2 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; import java.util.Collection; diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnection.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnection.java similarity index 96% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnection.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnection.java index 5858f0adb..5dbc1fbb9 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnection.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnection.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; import org.springframework.datastore.redis.UncategorizedRedisException; diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnectionFactory.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnectionFactory.java similarity index 87% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnectionFactory.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnectionFactory.java index 188fbd023..6eec34038 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisConnectionFactory.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisConnectionFactory.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; import org.springframework.dao.support.PersistenceExceptionTranslator; /** * Thread-safe factory of Redis connections. Additionally performs exception translation - * between the underlying Redis client library and Spring DAO exceptions. + * between the underlying Redis connection library and Spring DAO exceptions. * * @author Costin Leau */ diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisHashCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisHashCommands.java similarity index 92% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisHashCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisHashCommands.java index 0a2d36ba7..059d7ed84 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisHashCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisHashCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; /** * Hash-specific commands supported by Redis. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisListCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisListCommands.java similarity index 93% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisListCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisListCommands.java index 0beb7e485..dfb8a659e 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisListCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisListCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; /** * List-specific commands supported by Redis. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisSetCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisSetCommands.java similarity index 92% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisSetCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisSetCommands.java index ef1ea839f..a59bfec91 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisSetCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisSetCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; /** * Set-specific commands supported by Redis. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisStringCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisStringCommands.java similarity index 93% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisStringCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisStringCommands.java index 6f1ecbb23..ca6c6b6f1 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisStringCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisStringCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; /** * String specific commands supported by Redis. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisZSetCommands.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisZSetCommands.java similarity index 92% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisZSetCommands.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisZSetCommands.java index 74751221c..0a06436e6 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/RedisZSetCommands.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/RedisZSetCommands.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection; +package org.springframework.datastore.redis.connection; /** * ZSet(SortedSet)-specific commands supported by Redis. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnection.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnection.java similarity index 96% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnection.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnection.java index a7ef2a484..5abee1a56 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnection.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnection.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jedis; +package org.springframework.datastore.redis.connection.jedis; import java.io.IOException; import java.lang.reflect.Field; @@ -22,8 +22,8 @@ import java.util.Collection; import org.springframework.dao.DataAccessException; import org.springframework.datastore.keyvalue.UncategorizedKeyvalueStoreException; import org.springframework.datastore.redis.UncategorizedRedisException; -import org.springframework.datastore.redis.core.connection.DataType; -import org.springframework.datastore.redis.core.connection.RedisConnection; +import org.springframework.datastore.redis.connection.DataType; +import org.springframework.datastore.redis.connection.RedisConnection; import org.springframework.util.ReflectionUtils; import redis.clients.jedis.Client; @@ -51,7 +51,7 @@ public class JedisConnection implements RedisConnection { public JedisConnection(Jedis jedis) { this.jedis = jedis; - // extract underlying client for batch operations + // extract underlying connection for batch operations client = (Client) ReflectionUtils.getField(CLIENT_FIELD, jedis); transaction = new Transaction(client); } diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnectionFactory.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnectionFactory.java similarity index 88% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnectionFactory.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnectionFactory.java index 9a0c8e079..296c7f672 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisConnectionFactory.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisConnectionFactory.java @@ -14,10 +14,8 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jedis; +package org.springframework.datastore.redis.connection.jedis; -import java.net.InetAddress; -import java.net.UnknownHostException; import java.util.concurrent.TimeoutException; import org.apache.commons.logging.Log; @@ -25,8 +23,8 @@ import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.dao.DataAccessException; -import org.springframework.datastore.redis.core.connection.RedisConnection; -import org.springframework.datastore.redis.core.connection.RedisConnectionFactory; +import org.springframework.datastore.redis.connection.RedisConnection; +import org.springframework.datastore.redis.connection.RedisConnectionFactory; import org.springframework.util.Assert; import org.springframework.util.StringUtils; @@ -139,17 +137,7 @@ public class JedisConnectionFactory implements InitializingBean, DisposableBean, } private static String getDefaultHostName() { - String temp; - try { - InetAddress localMachine = InetAddress.getLocalHost(); - temp = localMachine.getHostName(); - if (log.isDebugEnabled()) - log.debug("Using hostname [" + temp + "] for hostname."); - } catch (UnknownHostException e) { - log.warn("Could not get host name, using 'localhost' as default value", e); - temp = "localhost"; - } - return temp; + return "localhost"; } /** diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisUtils.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisUtils.java similarity index 97% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisUtils.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisUtils.java index f88e4fd7f..054ceb6c4 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jedis/JedisUtils.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jedis/JedisUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jedis; +package org.springframework.datastore.redis.connection.jedis; import java.io.IOException; import java.net.UnknownHostException; diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnection.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnection.java similarity index 86% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnection.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnection.java index 6f52b364e..2b5f1e0e7 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnection.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnection.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jredis; +package org.springframework.datastore.redis.connection.jredis; import java.util.Collection; @@ -22,8 +22,8 @@ import org.jredis.RedisException; import org.springframework.dao.DataAccessException; import org.springframework.datastore.keyvalue.UncategorizedKeyvalueStoreException; import org.springframework.datastore.redis.UncategorizedRedisException; -import org.springframework.datastore.redis.core.connection.DataType; -import org.springframework.datastore.redis.core.connection.RedisConnection; +import org.springframework.datastore.redis.connection.DataType; +import org.springframework.datastore.redis.connection.RedisConnection; /** * @author Costin Leau @@ -163,7 +163,12 @@ public class JredisConnection implements RedisConnection { @Override public Integer lPush(String key, String value) { - throw new UnsupportedOperationException(); + try { + jredis.lpush(key, value); + return null; + } catch (RedisException ex) { + throw JredisUtils.convertJredisAccessException(ex); + } } @Override @@ -173,11 +178,19 @@ public class JredisConnection implements RedisConnection { @Override public String get(String key) { - throw new UnsupportedOperationException(); + try { + return JredisUtils.convertToString(jredis.get(key), encoding); + } catch (RedisException ex) { + throw JredisUtils.convertJredisAccessException(ex); + } } @Override public void set(String key, String value) { - throw new UnsupportedOperationException(); + try { + jredis.set(key, value); + } catch (RedisException ex) { + throw JredisUtils.convertJredisAccessException(ex); + } } } \ No newline at end of file diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnectionFactory.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnectionFactory.java similarity index 93% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnectionFactory.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnectionFactory.java index 799c4ebf5..5cc3cd869 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisConnectionFactory.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisConnectionFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jredis; +package org.springframework.datastore.redis.connection.jredis; import org.jredis.JRedis; import org.jredis.connector.ConnectionSpec; @@ -24,13 +24,13 @@ import org.jredis.ri.alphazero.connection.DefaultConnectionSpec; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.dao.DataAccessException; -import org.springframework.datastore.redis.core.connection.RedisConnection; -import org.springframework.datastore.redis.core.connection.RedisConnectionFactory; +import org.springframework.datastore.redis.connection.RedisConnection; +import org.springframework.datastore.redis.connection.RedisConnectionFactory; import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** - * Connection factory on top of {@link JRedis} client. + * Connection factory on top of {@link JRedis} connection. * * @author Costin Leau */ diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisUtils.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisUtils.java similarity index 72% rename from spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisUtils.java rename to spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisUtils.java index fbee9aed2..c995e156c 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/connection/jredis/JredisUtils.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/connection/jredis/JredisUtils.java @@ -14,10 +14,13 @@ * limitations under the License. */ -package org.springframework.datastore.redis.core.connection.jredis; +package org.springframework.datastore.redis.connection.jredis; + +import java.io.UnsupportedEncodingException; import org.jredis.RedisException; import org.springframework.dao.DataAccessException; +import org.springframework.dao.DataRetrievalFailureException; import org.springframework.dao.InvalidDataAccessApiUsageException; /** @@ -30,4 +33,12 @@ public abstract class JredisUtils { public static DataAccessException convertJredisAccessException(RedisException ex) { return new InvalidDataAccessApiUsageException(ex.getMessage(), ex); } + + public static String convertToString(byte[] bytes, String encoding) { + try { + return new String(bytes, encoding); + } catch (UnsupportedEncodingException ex) { + throw new DataRetrievalFailureException("Unsupported encoding " + encoding, ex); + } + } } diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisAccessor.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisAccessor.java index 0ab10b3a5..424ed67ea 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisAccessor.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisAccessor.java @@ -18,7 +18,7 @@ package org.springframework.datastore.redis.core; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.InitializingBean; -import org.springframework.datastore.redis.core.connection.RedisConnectionFactory; +import org.springframework.datastore.redis.connection.RedisConnectionFactory; import org.springframework.util.Assert; /** diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisCallback.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisCallback.java index 414dd235d..b504551b0 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisCallback.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisCallback.java @@ -15,7 +15,7 @@ */ package org.springframework.datastore.redis.core; -import org.springframework.datastore.redis.core.connection.RedisConnection; +import org.springframework.datastore.redis.connection.RedisConnection; /** * Callback interface for Redis code. To be used with {@link RedisTemplate} execution methods, often as anonymous diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisConnectionUtils.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisConnectionUtils.java index b337699fd..a1270ca0d 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisConnectionUtils.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisConnectionUtils.java @@ -17,8 +17,8 @@ package org.springframework.datastore.redis.core; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.datastore.redis.core.connection.RedisConnection; -import org.springframework.datastore.redis.core.connection.RedisConnectionFactory; +import org.springframework.datastore.redis.connection.RedisConnection; +import org.springframework.datastore.redis.connection.RedisConnectionFactory; import org.springframework.transaction.support.ResourceHolder; import org.springframework.transaction.support.ResourceHolderSynchronization; import org.springframework.transaction.support.TransactionSynchronizationManager; diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisTemplate.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisTemplate.java index 9578f707d..a8dad5c96 100644 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisTemplate.java +++ b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/core/RedisTemplate.java @@ -20,8 +20,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import org.springframework.datastore.redis.core.connection.RedisConnection; -import org.springframework.datastore.redis.core.connection.RedisConnectionFactory; +import org.springframework.datastore.redis.connection.RedisConnection; +import org.springframework.datastore.redis.connection.RedisConnectionFactory; import org.springframework.datastore.redis.support.converter.RedisConverter; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; @@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils; /** * - * Helper class that simplifies Redis data access code. Automatically converts Redis client exceptions into + * Helper class that simplifies Redis data access code. Automatically converts Redis connection exceptions into * DataAccessExceptions, following the org.springframework.dao exception hierarchy. * * The central method is execute, supporting Redis access code implementing the {@link RedisCallback} interface. diff --git a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/support/RedisPersistenceExceptionTranslator.java b/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/support/RedisPersistenceExceptionTranslator.java deleted file mode 100644 index 41a9a81d9..000000000 --- a/spring-datastore-redis/src/main/java/org/springframework/datastore/redis/support/RedisPersistenceExceptionTranslator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2010 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.datastore.redis.support; - -import org.springframework.dao.DataAccessException; - -/** - * Interface implemented by Spring integrations with Redis for drivers - * that throw runtime and checked exceptions. - * - * @author Mark Pollack - * - */ -public interface RedisPersistenceExceptionTranslator { - - //NOTE some client libraries throw checked exceptions. - DataAccessException translateException(Exception ex); -}