+ rename package from o.s.datastore to o.s.data
+ add redis as subpackage of data.keyvalue
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis;
|
||||
package org.springframework.data.keyvalue.redis;
|
||||
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis;
|
||||
package org.springframework.data.keyvalue.redis;
|
||||
|
||||
import org.springframework.datastore.keyvalue.UncategorizedKeyvalueStoreException;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import org.springframework.datastore.redis.connection.RedisZSetCommands.Tuple;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisZSetCommands.Tuple;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link Tuple} interface.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
|
||||
|
||||
/**
|
||||
* A connection (session) to a Redis server.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.connection.jedis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jedis;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -24,10 +24,10 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
|
||||
import org.springframework.data.keyvalue.redis.connection.DataType;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.datastore.keyvalue.UncategorizedKeyvalueStoreException;
|
||||
import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
import org.springframework.datastore.redis.connection.DataType;
|
||||
import org.springframework.datastore.redis.connection.RedisConnection;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
import redis.clients.jedis.BinaryJedis;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection.jedis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jedis;
|
||||
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
@@ -23,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.connection.RedisConnection;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection.jedis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jedis;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.UnknownHostException;
|
||||
@@ -26,10 +26,10 @@ import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.datastore.redis.RedisConnectionFailureException;
|
||||
import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
import org.springframework.datastore.redis.connection.DefaultTuple;
|
||||
import org.springframework.datastore.redis.connection.RedisZSetCommands.Tuple;
|
||||
import org.springframework.data.keyvalue.redis.RedisConnectionFailureException;
|
||||
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
|
||||
import org.springframework.data.keyvalue.redis.connection.DefaultTuple;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisZSetCommands.Tuple;
|
||||
|
||||
import redis.clients.jedis.JedisException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.connection.jredis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jredis;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
@@ -26,10 +26,10 @@ import java.util.Set;
|
||||
import org.jredis.JRedis;
|
||||
import org.jredis.RedisException;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
|
||||
import org.springframework.data.keyvalue.redis.connection.DataType;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.datastore.keyvalue.UncategorizedKeyvalueStoreException;
|
||||
import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
import org.springframework.datastore.redis.connection.DataType;
|
||||
import org.springframework.datastore.redis.connection.RedisConnection;
|
||||
|
||||
/**
|
||||
* JRedis based implementation.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.connection.jredis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jredis;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@@ -26,8 +26,8 @@ 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.connection.RedisConnection;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection.jredis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jredis;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
@@ -27,7 +27,7 @@ import org.jredis.RedisException;
|
||||
import org.jredis.RedisType;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.datastore.redis.connection.DataType;
|
||||
import org.springframework.data.keyvalue.redis.connection.DataType;
|
||||
|
||||
/**
|
||||
* Helper class featuring methods for JRedis connection handling, providing support for exception translation.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
/**
|
||||
* Redis store for a certain key. Useful for creating views into Redis 'collection' types.
|
||||
@@ -1,126 +1,126 @@
|
||||
/*
|
||||
* 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.core;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Key value operations with 'friendly' names instead of using command names for methods.
|
||||
* Additional helper methods for working with keys and values
|
||||
*
|
||||
* @author Mark Pollack
|
||||
*
|
||||
*/
|
||||
public interface KeyValueOperations {
|
||||
|
||||
// Set and Set with expiry operations
|
||||
|
||||
void set(String key, String value);
|
||||
|
||||
void set(String key, String value, long expiryInMillis);
|
||||
|
||||
void setAsBytes(String key, byte[] value);
|
||||
|
||||
void setAsBytes(String key, byte[] value, long expiryInMillis);
|
||||
|
||||
void convertAndSet(String key, Object value);
|
||||
|
||||
void convertAndSet(String key, Object value, long expiryInMillis);
|
||||
|
||||
// Get operations
|
||||
|
||||
String get(String key);
|
||||
|
||||
byte[] getAsBytes(String key);
|
||||
|
||||
<T> T getAndConvert(String key, Class<T> requiredType);
|
||||
|
||||
// Get and Set operations
|
||||
|
||||
String getAndSet(String key, String value);
|
||||
|
||||
byte[] getAndSetBytes(String key, byte[] value);
|
||||
|
||||
<T> T getAndSetObject(String key, T value, Class<T> requiredType);
|
||||
|
||||
// Multi-get operations
|
||||
|
||||
List<String> getValues(List<String> keys);
|
||||
|
||||
<T> List<T> getAndConvertValues(List<String> keys, Class<T> requiredType);
|
||||
|
||||
|
||||
// Set if non-existent operations
|
||||
|
||||
void setIfKeyNonExistent(String key, String value);
|
||||
|
||||
void setIfKeyNonExistent(String key, byte[] value);
|
||||
|
||||
void convertAndSetIfKeyNonExistent(String key, Object value);
|
||||
|
||||
// Multiple key-value set
|
||||
|
||||
void setMultiple(Map<String, String> keysAndValues);
|
||||
|
||||
void setMultipleAsBytes(Map<String, byte[]> keysAndValues);
|
||||
|
||||
<T> void convertAndSetMultiple(Map<String, T> keysAndValues);
|
||||
|
||||
// Multiple key-value set if non-existent
|
||||
|
||||
void setMultipleIfKeysNonExistent(Map<String, String> keysAndValues);
|
||||
|
||||
void setMultipleAsBytesIfKeysNonExistent(Map<String, byte[]> keysAndValues);
|
||||
|
||||
<T> void convertAndSetMultipleIfKeysNonExistent(Map<String, T> keysAndValues);
|
||||
|
||||
|
||||
|
||||
// Append
|
||||
|
||||
int append(String key, String value);
|
||||
|
||||
|
||||
|
||||
// Increment
|
||||
|
||||
int increment(String key);
|
||||
|
||||
int incrementBy(String key, int value);
|
||||
|
||||
// Decrement
|
||||
|
||||
int decrement(String key);
|
||||
|
||||
int decrementBy(String key, int value);
|
||||
|
||||
|
||||
// Substring
|
||||
|
||||
String getSubString(String key, int fromIndex, int toIndex);
|
||||
|
||||
boolean containsKey(String key);
|
||||
|
||||
boolean deleteKeys(String... keys);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
* 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.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Key value operations with 'friendly' names instead of using command names for methods.
|
||||
* Additional helper methods for working with keys and values
|
||||
*
|
||||
* @author Mark Pollack
|
||||
*
|
||||
*/
|
||||
public interface KeyValueOperations {
|
||||
|
||||
// Set and Set with expiry operations
|
||||
|
||||
void set(String key, String value);
|
||||
|
||||
void set(String key, String value, long expiryInMillis);
|
||||
|
||||
void setAsBytes(String key, byte[] value);
|
||||
|
||||
void setAsBytes(String key, byte[] value, long expiryInMillis);
|
||||
|
||||
void convertAndSet(String key, Object value);
|
||||
|
||||
void convertAndSet(String key, Object value, long expiryInMillis);
|
||||
|
||||
// Get operations
|
||||
|
||||
String get(String key);
|
||||
|
||||
byte[] getAsBytes(String key);
|
||||
|
||||
<T> T getAndConvert(String key, Class<T> requiredType);
|
||||
|
||||
// Get and Set operations
|
||||
|
||||
String getAndSet(String key, String value);
|
||||
|
||||
byte[] getAndSetBytes(String key, byte[] value);
|
||||
|
||||
<T> T getAndSetObject(String key, T value, Class<T> requiredType);
|
||||
|
||||
// Multi-get operations
|
||||
|
||||
List<String> getValues(List<String> keys);
|
||||
|
||||
<T> List<T> getAndConvertValues(List<String> keys, Class<T> requiredType);
|
||||
|
||||
|
||||
// Set if non-existent operations
|
||||
|
||||
void setIfKeyNonExistent(String key, String value);
|
||||
|
||||
void setIfKeyNonExistent(String key, byte[] value);
|
||||
|
||||
void convertAndSetIfKeyNonExistent(String key, Object value);
|
||||
|
||||
// Multiple key-value set
|
||||
|
||||
void setMultiple(Map<String, String> keysAndValues);
|
||||
|
||||
void setMultipleAsBytes(Map<String, byte[]> keysAndValues);
|
||||
|
||||
<T> void convertAndSetMultiple(Map<String, T> keysAndValues);
|
||||
|
||||
// Multiple key-value set if non-existent
|
||||
|
||||
void setMultipleIfKeysNonExistent(Map<String, String> keysAndValues);
|
||||
|
||||
void setMultipleAsBytesIfKeysNonExistent(Map<String, byte[]> keysAndValues);
|
||||
|
||||
<T> void convertAndSetMultipleIfKeysNonExistent(Map<String, T> keysAndValues);
|
||||
|
||||
|
||||
|
||||
// Append
|
||||
|
||||
int append(String key, String value);
|
||||
|
||||
|
||||
|
||||
// Increment
|
||||
|
||||
int increment(String key);
|
||||
|
||||
int incrementBy(String key, int value);
|
||||
|
||||
// Decrement
|
||||
|
||||
int decrement(String key);
|
||||
|
||||
int decrementBy(String key, int value);
|
||||
|
||||
|
||||
// Substring
|
||||
|
||||
String getSubString(String key, int fromIndex, int toIndex);
|
||||
|
||||
boolean containsKey(String key);
|
||||
|
||||
boolean deleteKeys(String... keys);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.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.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import org.springframework.datastore.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
|
||||
/**
|
||||
* Callback interface for Redis code. To be used with {@link RedisTemplate} execution methods, often as anonymous
|
||||
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.datastore.redis.connection.RedisConnection;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.transaction.support.ResourceHolder;
|
||||
import org.springframework.transaction.support.ResourceHolderSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -25,11 +25,11 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.datastore.redis.connection.RedisConnection;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.datastore.redis.serializer.RedisSerializer;
|
||||
import org.springframework.datastore.redis.serializer.SimpleRedisSerializer;
|
||||
import org.springframework.datastore.redis.serializer.StringRedisSerializer;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.serializer.RedisSerializer;
|
||||
import org.springframework.data.keyvalue.redis.serializer.SimpleRedisSerializer;
|
||||
import org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.serializer;
|
||||
package org.springframework.data.keyvalue.redis.serializer;
|
||||
|
||||
/**
|
||||
* Basic interface serialization and deserialization of Objects to byte arrays.
|
||||
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.serializer;
|
||||
package org.springframework.data.keyvalue.redis.serializer;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.core.serializer.support.DeserializingConverter;
|
||||
import org.springframework.core.serializer.support.SerializingConverter;
|
||||
import org.springframework.datastore.redis.UncategorizedRedisException;
|
||||
import org.springframework.data.keyvalue.redis.UncategorizedRedisException;
|
||||
|
||||
/**
|
||||
* Simple Redis serializer delegating to the default serializer in Spring 3.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.serializer;
|
||||
package org.springframework.data.keyvalue.redis.serializer;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
/*
|
||||
* 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.util;
|
||||
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Base implementation for Redis collections.
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
public abstract class AbstractRedisCollection<E> extends AbstractCollection<E> implements RedisStore<String> {
|
||||
|
||||
public static final String ENCODING = "UTF-8";
|
||||
|
||||
protected final String key;
|
||||
protected final RedisOperations<String, E> operations;
|
||||
|
||||
public <K> AbstractRedisCollection(String key, RedisOperations<String, E> operations) {
|
||||
this.key = key;
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedisOperations<String, E> getOperations() {
|
||||
return operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends E> c) {
|
||||
boolean modified = false;
|
||||
for (E e : c) {
|
||||
modified |= add(e);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
public abstract boolean add(E e);
|
||||
|
||||
public abstract void clear();
|
||||
|
||||
@Override
|
||||
public boolean containsAll(Collection<?> c) {
|
||||
boolean contains = true;
|
||||
for (Object object : c) {
|
||||
contains &= contains(object);
|
||||
}
|
||||
return contains;
|
||||
}
|
||||
|
||||
public abstract boolean remove(Object o);
|
||||
|
||||
|
||||
@Override
|
||||
public boolean removeAll(Collection<?> c) {
|
||||
boolean modified = false;
|
||||
for (Object object : c) {
|
||||
modified |= remove(object);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
public boolean retainAll(Collection<?> c) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
|
||||
if (o instanceof RedisStore) {
|
||||
return key.equals(((RedisStore) o).getKey());
|
||||
}
|
||||
if (o instanceof AbstractRedisCollection) {
|
||||
return o.hashCode() == hashCode();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17 + getClass().hashCode();
|
||||
result = result * 31 + key.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("RedisStore for key:");
|
||||
sb.append(getKey());
|
||||
return sb.toString();
|
||||
}
|
||||
/*
|
||||
* 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.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.AbstractCollection;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Base implementation for Redis collections.
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
public abstract class AbstractRedisCollection<E> extends AbstractCollection<E> implements RedisStore<String> {
|
||||
|
||||
public static final String ENCODING = "UTF-8";
|
||||
|
||||
protected final String key;
|
||||
protected final RedisOperations<String, E> operations;
|
||||
|
||||
public <K> AbstractRedisCollection(String key, RedisOperations<String, E> operations) {
|
||||
this.key = key;
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedisOperations<String, E> getOperations() {
|
||||
return operations;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends E> c) {
|
||||
boolean modified = false;
|
||||
for (E e : c) {
|
||||
modified |= add(e);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
public abstract boolean add(E e);
|
||||
|
||||
public abstract void clear();
|
||||
|
||||
@Override
|
||||
public boolean containsAll(Collection<?> c) {
|
||||
boolean contains = true;
|
||||
for (Object object : c) {
|
||||
contains &= contains(object);
|
||||
}
|
||||
return contains;
|
||||
}
|
||||
|
||||
public abstract boolean remove(Object o);
|
||||
|
||||
|
||||
@Override
|
||||
public boolean removeAll(Collection<?> c) {
|
||||
boolean modified = false;
|
||||
for (Object object : c) {
|
||||
modified |= remove(object);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
public boolean retainAll(Collection<?> c) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
|
||||
if (o instanceof RedisStore) {
|
||||
return key.equals(((RedisStore) o).getKey());
|
||||
}
|
||||
if (o instanceof AbstractRedisCollection) {
|
||||
return o.hashCode() == hashCode();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17 + getClass().hashCode();
|
||||
result = result * 31 + key.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("RedisStore for key:");
|
||||
sb.append(getKey());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
@@ -21,8 +21,8 @@ import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.springframework.datastore.redis.core.ListOperations;
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.ListOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link RedisList}.
|
||||
@@ -13,15 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.datastore.redis.connection.RedisCommands;
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisCommands;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Default {@link RedisMap} implementation.
|
||||
@@ -39,7 +39,7 @@ public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
|
||||
*
|
||||
* @param entry
|
||||
*/
|
||||
public DefaultRedisMapEntry(org.springframework.datastore.redis.connection.RedisHashCommands.Entry entry) {
|
||||
public DefaultRedisMapEntry(org.springframework.data.keyvalue.redis.connection.RedisHashCommands.Entry entry) {
|
||||
this.key = entry.getField();
|
||||
this.value = entry.getValue();
|
||||
}
|
||||
@@ -122,11 +122,11 @@ public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
|
||||
return createEntrySet(commands.hGetAll(redisKey));
|
||||
}
|
||||
|
||||
private Set<java.util.Map.Entry<String, String>> createEntrySet(Set<org.springframework.datastore.redis.connection.RedisHashCommands.Entry> entries) {
|
||||
private Set<java.util.Map.Entry<String, String>> createEntrySet(Set<org.springframework.data.keyvalue.redis.connection.RedisHashCommands.Entry> entries) {
|
||||
Set<java.util.Map.Entry<String, String>> result = new LinkedHashSet<java.util.Map.Entry<String, String>>(
|
||||
entries.size());
|
||||
|
||||
for (org.springframework.datastore.redis.connection.RedisHashCommands.Entry entry : entries) {
|
||||
for (org.springframework.data.keyvalue.redis.connection.RedisHashCommands.Entry entry : entries) {
|
||||
result.add(new DefaultRedisMapEntry(entry));
|
||||
}
|
||||
return result;
|
||||
@@ -13,13 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.datastore.redis.core.BoundSetOperations;
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.BoundSetOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link RedisSet}.
|
||||
@@ -13,15 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
|
||||
import org.springframework.datastore.redis.core.BoundZSetOperations;
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.BoundZSetOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link RedisSortedSet}.
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Atomic integer backed by Redis.
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
/**
|
||||
* Atomic long backed by Redis.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
|
||||
|
||||
/**
|
||||
@@ -1,20 +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.keyvalue.redis;
|
||||
|
||||
public class PlaceHolder {
|
||||
|
||||
}
|
||||
@@ -5,6 +5,6 @@
|
||||
|
||||
<description>Example configuration to get you started.</description>
|
||||
|
||||
<bean id="service" class="org.springframework.datastore.ExampleService" />
|
||||
<bean id="service" class="org.springframework.data.ExampleService" />
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis;
|
||||
package org.springframework.data.keyvalue.redis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis;
|
||||
package org.springframework.data.keyvalue.redis;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection;
|
||||
package org.springframework.data.keyvalue.redis.connection;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assume.*;
|
||||
@@ -22,7 +22,9 @@ import static org.junit.Assume.*;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.datastore.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnection;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
|
||||
public abstract class AbstractConnectionIntegrationTests {
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection.jedis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jedis;
|
||||
|
||||
import org.springframework.datastore.redis.connection.AbstractConnectionIntegrationTests;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.AbstractConnectionIntegrationTests;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.jedis.JedisConnectionFactory;
|
||||
|
||||
public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrationTests {
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.connection.jredis;
|
||||
package org.springframework.data.keyvalue.redis.connection.jredis;
|
||||
|
||||
import org.springframework.datastore.redis.connection.AbstractConnectionIntegrationTests;
|
||||
import org.springframework.datastore.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.AbstractConnectionIntegrationTests;
|
||||
import org.springframework.data.keyvalue.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.connection.jredis.JredisConnectionFactory;
|
||||
|
||||
public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrationTests {
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.datastore.redis.core;
|
||||
package org.springframework.data.keyvalue.redis.core;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.datastore.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisTemplate;
|
||||
|
||||
public class RedisTemplateIntegrationTests {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.serializer;
|
||||
package org.springframework.data.keyvalue.redis.serializer;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -23,8 +23,10 @@ import java.util.UUID;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.datastore.redis.Address;
|
||||
import org.springframework.datastore.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.Address;
|
||||
import org.springframework.data.keyvalue.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.serializer.RedisSerializer;
|
||||
import org.springframework.data.keyvalue.redis.serializer.SimpleRedisSerializer;
|
||||
|
||||
|
||||
public class SimpleRedisSerializerTests {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
@@ -34,6 +34,8 @@ import java.util.List;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.keyvalue.redis.util.AbstractRedisCollection;
|
||||
import org.springframework.data.keyvalue.redis.util.RedisStore;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.NoSuchElementException;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.keyvalue.redis.util.RedisList;
|
||||
|
||||
/**
|
||||
* Integration test for RedisList
|
||||
@@ -13,14 +13,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.datastore.redis.Address;
|
||||
import org.springframework.datastore.redis.Person;
|
||||
import org.springframework.datastore.redis.connection.jedis.JedisConnectionFactory;
|
||||
import org.springframework.datastore.redis.core.RedisTemplate;
|
||||
import org.springframework.data.keyvalue.redis.Address;
|
||||
import org.springframework.data.keyvalue.redis.Person;
|
||||
import org.springframework.data.keyvalue.redis.connection.jedis.JedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisTemplate;
|
||||
import org.springframework.data.keyvalue.redis.util.AbstractRedisCollection;
|
||||
import org.springframework.data.keyvalue.redis.util.DefaultRedisList;
|
||||
import org.springframework.data.keyvalue.redis.util.RedisStore;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,13 +13,16 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.datastore.redis.util;
|
||||
package org.springframework.data.keyvalue.redis.util;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.datastore.redis.connection.jedis.JedisConnectionFactory;
|
||||
import org.springframework.datastore.redis.core.RedisOperations;
|
||||
import org.springframework.datastore.redis.core.RedisTemplate;
|
||||
import org.springframework.data.keyvalue.redis.connection.jedis.JedisConnectionFactory;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisOperations;
|
||||
import org.springframework.data.keyvalue.redis.core.RedisTemplate;
|
||||
import org.springframework.data.keyvalue.redis.util.AbstractRedisCollection;
|
||||
import org.springframework.data.keyvalue.redis.util.DefaultRedisList;
|
||||
import org.springframework.data.keyvalue.redis.util.RedisStore;
|
||||
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user