diff --git a/src/main/java/org/springframework/data/redis/RedisSystemException.java b/src/main/java/org/springframework/data/redis/RedisSystemException.java
index 9174189ce..a7de1a349 100644
--- a/src/main/java/org/springframework/data/redis/RedisSystemException.java
+++ b/src/main/java/org/springframework/data/redis/RedisSystemException.java
@@ -20,7 +20,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* Exception thrown when we can't classify a Redis exception into one of Spring generic data access exceptions.
- *
+ *
* @author Costin Leau
*/
public class RedisSystemException extends UncategorizedDataAccessException {
diff --git a/src/main/java/org/springframework/data/redis/cache/DefaultRedisCachePrefix.java b/src/main/java/org/springframework/data/redis/cache/DefaultRedisCachePrefix.java
index 4df5abe7e..80ecd4b06 100644
--- a/src/main/java/org/springframework/data/redis/cache/DefaultRedisCachePrefix.java
+++ b/src/main/java/org/springframework/data/redis/cache/DefaultRedisCachePrefix.java
@@ -20,7 +20,8 @@ import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
- * Default implementation for {@link RedisCachePrefix} which uses the given cache name and a delimiter for creating the prefix.
+ * Default implementation for {@link RedisCachePrefix} which uses the given cache name and a delimiter for creating the
+ * prefix.
*
* @author Costin Leau
*/
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCache.java b/src/main/java/org/springframework/data/redis/cache/RedisCache.java
index 1c3ba0630..5beddb9e1 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCache.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCache.java
@@ -39,8 +39,7 @@ class RedisCache implements Cache {
private static final int PAGE_SIZE = 128;
private final String name;
- @SuppressWarnings("rawtypes")
- private final RedisTemplate template;
+ @SuppressWarnings("rawtypes") private final RedisTemplate template;
private final byte[] prefix;
private final byte[] setName;
private final byte[] cacheLockName;
@@ -48,9 +47,8 @@ class RedisCache implements Cache {
private final long expiration;
/**
- *
* Constructs a new RedisCache instance.
- *
+ *
* @param name cache name
* @param prefix
* @param template
@@ -76,10 +74,8 @@ class RedisCache implements Cache {
}
/**
- * {@inheritDoc}
- *
- * This implementation simply returns the RedisTemplate used for configuring the cache, giving access
- * to the underlying Redis store.
+ * {@inheritDoc} This implementation simply returns the RedisTemplate used for configuring the cache, giving access to
+ * the underlying Redis store.
*/
public Object getNativeCache() {
return template;
@@ -96,14 +92,14 @@ class RedisCache implements Cache {
}
}, true);
}
-
+
/**
- * Return the value to which this cache maps the specified key, generically specifying a type that return value will be cast to.
+ * Return the value to which this cache maps the specified key, generically specifying a type that return value will
+ * be cast to.
*
* @param key
* @param type
* @return
- *
* @see DATAREDIS-243
*/
public T get(Object key, Class type) {
@@ -112,7 +108,6 @@ class RedisCache implements Cache {
return wrapper == null ? null : (T) wrapper.get();
}
-
public void put(final Object key, final Object value) {
final byte[] k = computeKey(key);
@@ -121,8 +116,8 @@ class RedisCache implements Cache {
waitForLock(connection);
connection.multi();
byte[] v;
- if(template.getValueSerializer() == null && value instanceof byte[]) {
- v = (byte[])value;
+ if (template.getValueSerializer() == null && value instanceof byte[]) {
+ v = (byte[]) value;
} else {
v = template.getValueSerializer().serialize(value);
}
@@ -141,7 +136,6 @@ class RedisCache implements Cache {
}, true);
}
-
public void evict(Object key) {
final byte[] k = computeKey(key);
@@ -155,7 +149,6 @@ class RedisCache implements Cache {
}, true);
}
-
public void clear() {
// need to del each key individually
template.execute(new RedisCallback() {
@@ -173,8 +166,7 @@ class RedisCache implements Cache {
do {
// need to paginate the keys
- Set keys = connection.zRange(setName, (offset) * PAGE_SIZE, (offset + 1) * PAGE_SIZE
- - 1);
+ Set keys = connection.zRange(setName, (offset) * PAGE_SIZE, (offset + 1) * PAGE_SIZE - 1);
finished = keys.size() < PAGE_SIZE;
offset++;
if (!keys.isEmpty()) {
@@ -193,8 +185,8 @@ class RedisCache implements Cache {
}
private byte[] computeKey(Object key) {
- if(template.getKeySerializer() == null && key instanceof byte[]) {
- return (byte[])key;
+ if (template.getKeySerializer() == null && key instanceof byte[]) {
+ return (byte[]) key;
}
byte[] k = template.getKeySerializer().serialize(key);
@@ -223,4 +215,4 @@ class RedisCache implements Cache {
} while (retry);
return foundLock;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
index 9753d5dff..2238dcdde 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
@@ -27,10 +27,9 @@ import org.springframework.cache.CacheManager;
import org.springframework.data.redis.core.RedisTemplate;
/**
- * CacheManager implementation for Redis.
- * By default saves the keys directly, without appending a prefix (which acts as a namespace).
- * To avoid clashes, it is recommended to change this (by setting 'usePrefix' to 'true').
- * For performance reasons, the current implementation uses a set for the keys in each cache.
+ * CacheManager implementation for Redis. By default saves the keys directly, without appending a prefix (which acts as
+ * a namespace). To avoid clashes, it is recommended to change this (by setting 'usePrefix' to 'true'). For performance
+ * reasons, the current implementation uses a set for the keys in each cache.
*
* @author Costin Leau
*/
@@ -81,7 +80,7 @@ public class RedisCacheManager implements CacheManager {
/**
* Sets the cachePrefix. Defaults to 'DefaultRedisCachePrefix').
- *
+ *
* @param cachePrefix the cachePrefix to set
*/
public void setCachePrefix(RedisCachePrefix cachePrefix) {
@@ -90,7 +89,7 @@ public class RedisCacheManager implements CacheManager {
/**
* Sets the default expire time (in seconds).
- *
+ *
* @param defaultExpireTime time in seconds.
*/
public void setDefaultExpiration(long defaultExpireTime) {
@@ -99,10 +98,10 @@ public class RedisCacheManager implements CacheManager {
/**
* Sets the expire time (in seconds) for cache regions (by key).
- *
+ *
* @param expires time in seconds
*/
public void setExpires(Map expires) {
this.expires = (expires != null ? new ConcurrentHashMap(expires) : null);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCachePrefix.java b/src/main/java/org/springframework/data/redis/cache/RedisCachePrefix.java
index d64ea2cfa..8a7aef4cb 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCachePrefix.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCachePrefix.java
@@ -17,17 +17,17 @@
package org.springframework.data.redis.cache;
/**
- * Contract for generating 'prefixes' for Cache keys saved in Redis.
- * Due to the 'flat' nature of the Redis storage, the prefix is used as a 'namespace' for grouping the key/values inside a cache (and
- * to avoid collision with other caches or keys inside Redis).
+ * Contract for generating 'prefixes' for Cache keys saved in Redis. Due to the 'flat' nature of the Redis storage, the
+ * prefix is used as a 'namespace' for grouping the key/values inside a cache (and to avoid collision with other caches
+ * or keys inside Redis).
*
* @author Costin Leau
*/
public interface RedisCachePrefix {
/**
- * Returns the prefix for the given cache (identified by name).
- * Note the prefix is returned in raw form so it can be saved directly to Redis without any serialization.
+ * Returns the prefix for the given cache (identified by name). Note the prefix is returned in raw form so it can be
+ * saved directly to Redis without any serialization.
*
* @param cacheName the name of the cache using the prefix
* @return the prefix for the given cache.
diff --git a/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java b/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
index 5c7a40849..083148569 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
@@ -28,12 +28,10 @@ import org.w3c.dom.Element;
*/
class RedisCollectionParser extends AbstractSimpleBeanDefinitionParser {
-
protected Class> getBeanClass(Element element) {
return RedisCollectionFactoryBean.class;
}
-
protected void postProcess(BeanDefinitionBuilder beanDefinition, Element element) {
String template = element.getAttribute("template");
if (StringUtils.hasText(template)) {
@@ -41,7 +39,6 @@ class RedisCollectionParser extends AbstractSimpleBeanDefinitionParser {
}
}
-
protected boolean isEligibleAttribute(String attributeName) {
return super.isEligibleAttribute(attributeName) && (!"template".equals(attributeName));
}
diff --git a/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java b/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
index ee81ed99f..2c66ca935 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
@@ -43,17 +43,15 @@ import org.w3c.dom.NamedNodeMap;
*/
class RedisListenerContainerParser extends AbstractSimpleBeanDefinitionParser {
-
protected Class getBeanClass(Element element) {
return RedisMessageListenerContainer.class;
}
@SuppressWarnings("unchecked")
-
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
// parse attributes (but replace the value assignment with references)
NamedNodeMap attributes = element.getAttributes();
-
+
for (int x = 0; x < attributes.getLength(); x++) {
Attr attribute = (Attr) attributes.item(x);
if (isEligibleAttribute(attribute, parserContext)) {
@@ -87,13 +85,13 @@ class RedisListenerContainerParser extends AbstractSimpleBeanDefinitionParser {
}
}
-
protected boolean isEligibleAttribute(String attributeName) {
return (!"phase".equals(attributeName));
}
/**
- * Parses a listener definition. Returns the listener bean reference definition (as the array first entry) and its associated topics (also as bean definitions).
+ * Parses a listener definition. Returns the listener bean reference definition (as the array first entry) and its
+ * associated topics (also as bean definitions).
*
* @param element
* @return
@@ -103,17 +101,17 @@ class RedisListenerContainerParser extends AbstractSimpleBeanDefinitionParser {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(MessageListenerAdapter.class);
builder.addConstructorArgReference(element.getAttribute("ref"));
-
+
String method = element.getAttribute("method");
- if (StringUtils.hasText(method)){
- builder.addPropertyValue("defaultListenerMethod", method);
+ if (StringUtils.hasText(method)) {
+ builder.addPropertyValue("defaultListenerMethod", method);
}
-
+
String serializer = element.getAttribute("serializer");
- if (StringUtils.hasText(serializer)){
+ if (StringUtils.hasText(serializer)) {
builder.addPropertyReference("serializer", serializer);
}
-
+
// assemble topics
Collection topics = new ArrayList();
@@ -132,8 +130,7 @@ class RedisListenerContainerParser extends AbstractSimpleBeanDefinitionParser {
return ret;
}
-
protected boolean shouldGenerateId() {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java b/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
index e8825f6f8..080681251 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
@@ -25,7 +25,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
*/
class RedisNamespaceHandler extends NamespaceHandlerSupport {
-
public void init() {
registerBeanDefinitionParser("listener-container", new RedisListenerContainerParser());
registerBeanDefinitionParser("collection", new RedisCollectionParser());
diff --git a/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java b/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
index 65d4abb47..9ba1ccca8 100644
--- a/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
+++ b/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
@@ -22,10 +22,9 @@ import org.springframework.data.redis.connection.srp.SrpConnectionFactory;
/**
* Utilities for examining a {@link RedisConnection}
- *
+ *
* @author Jennifer Hickey
* @author Thomas Darimont
- *
*/
public abstract class ConnectionUtils {
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java b/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
index db003f47f..946728c5f 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.connection;
-
/**
* Default message implementation.
*
@@ -32,19 +31,16 @@ public class DefaultMessage implements Message {
this.channel = channel;
}
-
public byte[] getChannel() {
return (channel != null ? channel.clone() : null);
}
-
public byte[] getBody() {
return (body != null ? body.clone() : null);
}
-
public String toString() {
- if (toString == null){
+ if (toString == null) {
toString = new String(body);
}
return toString;
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java b/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
index 6965abf9b..d4303e05c 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
@@ -18,7 +18,6 @@ package org.springframework.data.redis.connection;
import java.util.ArrayList;
import java.util.List;
-
/**
* Default implementation for {@link SortParameters}.
*
@@ -41,7 +40,7 @@ public class DefaultSortParameters implements SortParameters {
/**
* Constructs a new DefaultSortParameters instance.
- *
+ *
* @param limit
* @param order
* @param alphabetic
@@ -52,7 +51,7 @@ public class DefaultSortParameters implements SortParameters {
/**
* Constructs a new DefaultSortParameters instance.
- *
+ *
* @param byPattern
* @param limit
* @param getPattern
@@ -68,7 +67,6 @@ public class DefaultSortParameters implements SortParameters {
setGetPattern(getPattern);
}
-
public byte[] getByPattern() {
return byPattern;
}
@@ -77,7 +75,6 @@ public class DefaultSortParameters implements SortParameters {
this.byPattern = byPattern;
}
-
public Range getLimit() {
return limit;
}
@@ -86,7 +83,6 @@ public class DefaultSortParameters implements SortParameters {
this.limit = limit;
}
-
public byte[][] getGetPattern() {
return getPattern.toArray(new byte[getPattern.size()][]);
}
@@ -98,7 +94,7 @@ public class DefaultSortParameters implements SortParameters {
public void setGetPattern(byte[][] gPattern) {
getPattern.clear();
- if(gPattern == null) {
+ if (gPattern == null) {
return;
}
@@ -107,7 +103,6 @@ public class DefaultSortParameters implements SortParameters {
}
}
-
public Order getOrder() {
return order;
}
@@ -116,7 +111,6 @@ public class DefaultSortParameters implements SortParameters {
this.order = order;
}
-
public Boolean isAlphabetic() {
return alphabetic;
}
@@ -168,4 +162,4 @@ public class DefaultSortParameters implements SortParameters {
setLimit(new Range(start, count));
return this;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
index 0a493e170..d5693c450 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
@@ -47,26 +47,26 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
private final Log log = LogFactory.getLog(DefaultStringRedisConnection.class);
private final RedisConnection delegate;
private final RedisSerializer serializer;
- private Converter bytesToString = new DeserializingConverter();
- private SetConverter tupleToStringTuple = new SetConverter(new TupleConverter());
- private SetConverter stringTupleToTuple = new SetConverter(new StringTupleConverter());
- private ListConverter byteListToStringList = new ListConverter(bytesToString);
- private MapConverter byteMapToStringMap = new MapConverter(bytesToString);
- private SetConverter byteSetToStringSet = new SetConverter(bytesToString);
- @SuppressWarnings("rawtypes")
- private Queue pipelineConverters = new LinkedList();
- @SuppressWarnings("rawtypes")
- private Queue txConverters = new LinkedList();
+ private Converter bytesToString = new DeserializingConverter();
+ private SetConverter tupleToStringTuple = new SetConverter(
+ new TupleConverter());
+ private SetConverter stringTupleToTuple = new SetConverter(
+ new StringTupleConverter());
+ private ListConverter byteListToStringList = new ListConverter(bytesToString);
+ private MapConverter byteMapToStringMap = new MapConverter(bytesToString);
+ private SetConverter byteSetToStringSet = new SetConverter(bytesToString);
+ @SuppressWarnings("rawtypes") private Queue pipelineConverters = new LinkedList();
+ @SuppressWarnings("rawtypes") private Queue txConverters = new LinkedList();
private boolean deserializePipelineAndTxResults = false;
private IdentityConverter identityConverter = new IdentityConverter();
- private class DeserializingConverter implements Converter {
+ private class DeserializingConverter implements Converter {
public String convert(byte[] source) {
return serializer.deserialize(source);
}
}
- private class TupleConverter implements Converter {
+ private class TupleConverter implements Converter {
public StringTuple convert(Tuple source) {
return new DefaultStringTuple(source, serializer.deserialize(source.getValue()));
}
@@ -98,9 +98,9 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
}
/**
- * Constructs a new DefaultStringRedisConnection instance.
- * Uses {@link StringRedisSerializer} as underlying serializer.
- *
+ * Constructs a new DefaultStringRedisConnection instance. Uses {@link StringRedisSerializer} as
+ * underlying serializer.
+ *
* @param connection Redis connection
*/
public DefaultStringRedisConnection(RedisConnection connection) {
@@ -111,7 +111,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
/**
* Constructs a new DefaultStringRedisConnection instance.
- *
+ *
* @param connection Redis connection
* @param serializer String serializer
*/
@@ -123,8 +123,8 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
}
public Long append(byte[] key, byte[] value) {
- Long result = delegate.append(key,value);
- if(isFutureConversion()) {
+ Long result = delegate.append(key, value);
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -140,7 +140,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List bLPop(int timeout, byte[]... keys) {
List results = delegate.bLPop(timeout, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -148,7 +148,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List bRPop(int timeout, byte[]... keys) {
List results = delegate.bRPop(timeout, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -156,7 +156,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] bRPopLPush(int timeout, byte[] srcKey, byte[] dstKey) {
byte[] result = delegate.bRPopLPush(timeout, srcKey, dstKey);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -168,7 +168,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long dbSize() {
Long result = delegate.dbSize();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -176,7 +176,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long decr(byte[] key) {
Long result = delegate.decr(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -184,7 +184,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long decrBy(byte[] key, long value) {
Long result = delegate.decrBy(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -192,7 +192,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long del(byte[]... keys) {
Long result = delegate.del(keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -208,7 +208,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] echo(byte[] message) {
byte[] result = delegate.echo(message);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -218,7 +218,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List exec() {
try {
List results = delegate.exec();
- if(isPipelined()) {
+ if (isPipelined()) {
pipelineConverters.add(new TransactionResultConverter(new LinkedList(txConverters)));
return results;
}
@@ -229,8 +229,8 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
}
public Boolean exists(byte[] key) {
- Boolean result = delegate.exists(key);
- if(isFutureConversion()) {
+ Boolean result = delegate.exists(key);
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -238,7 +238,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean expire(byte[] key, long seconds) {
Boolean result = delegate.expire(key, seconds);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -246,7 +246,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean expireAt(byte[] key, long unixTime) {
Boolean result = delegate.expireAt(key, unixTime);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -262,7 +262,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] get(byte[] key) {
byte[] result = delegate.get(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -270,7 +270,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean getBit(byte[] key, long offset) {
Boolean result = delegate.getBit(key, offset);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -278,7 +278,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List getConfig(String pattern) {
List results = delegate.getConfig(pattern);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -286,7 +286,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Object getNativeConnection() {
Object result = delegate.getNativeConnection();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -294,7 +294,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] getRange(byte[] key, long start, long end) {
byte[] result = delegate.getRange(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -302,7 +302,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] getSet(byte[] key, byte[] value) {
byte[] result = delegate.getSet(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -314,7 +314,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long hDel(byte[] key, byte[]... fields) {
Long result = delegate.hDel(key, fields);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -322,7 +322,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean hExists(byte[] key, byte[] field) {
Boolean result = delegate.hExists(key, field);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -330,15 +330,15 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] hGet(byte[] key, byte[] field) {
byte[] result = delegate.hGet(key, field);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
public Map hGetAll(byte[] key) {
- Map results = delegate.hGetAll(key);
- if(isFutureConversion()) {
+ Map results = delegate.hGetAll(key);
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -346,7 +346,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long hIncrBy(byte[] key, byte[] field, long delta) {
Long result = delegate.hIncrBy(key, field, delta);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -354,7 +354,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double hIncrBy(byte[] key, byte[] field, double delta) {
Double result = delegate.hIncrBy(key, field, delta);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -362,7 +362,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set hKeys(byte[] key) {
Set results = delegate.hKeys(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -370,7 +370,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long hLen(byte[] key) {
Long result = delegate.hLen(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -378,7 +378,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List hMGet(byte[] key, byte[]... fields) {
List results = delegate.hMGet(key, fields);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -390,7 +390,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean hSet(byte[] key, byte[] field, byte[] value) {
Boolean result = delegate.hSet(key, field, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -398,7 +398,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean hSetNX(byte[] key, byte[] field, byte[] value) {
Boolean result = delegate.hSetNX(key, field, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -406,7 +406,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List hVals(byte[] key) {
List results = delegate.hVals(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -414,7 +414,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long incr(byte[] key) {
Long result = delegate.incr(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -422,7 +422,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long incrBy(byte[] key, long value) {
Long result = delegate.incrBy(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -430,7 +430,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double incrBy(byte[] key, double value) {
Double result = delegate.incrBy(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -438,7 +438,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Properties info() {
Properties result = delegate.info();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -446,7 +446,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Properties info(String section) {
Properties result = delegate.info(section);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -466,7 +466,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set keys(byte[] pattern) {
Set results = delegate.keys(pattern);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -474,7 +474,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lastSave() {
Long result = delegate.lastSave();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -482,7 +482,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] lIndex(byte[] key, long index) {
byte[] result = delegate.lIndex(key, index);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -490,7 +490,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lInsert(byte[] key, Position where, byte[] pivot, byte[] value) {
Long result = delegate.lInsert(key, where, pivot, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -498,7 +498,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lLen(byte[] key) {
Long result = delegate.lLen(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -506,7 +506,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] lPop(byte[] key) {
byte[] result = delegate.lPop(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -514,7 +514,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lPush(byte[] key, byte[]... values) {
Long result = delegate.lPush(key, values);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -522,7 +522,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lPushX(byte[] key, byte[] value) {
Long result = delegate.lPushX(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -530,7 +530,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List lRange(byte[] key, long start, long end) {
List results = delegate.lRange(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -538,7 +538,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long lRem(byte[] key, long count, byte[] value) {
Long result = delegate.lRem(key, count, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -554,7 +554,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List mGet(byte[]... keys) {
List results = delegate.mGet(keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -566,7 +566,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean mSetNX(Map tuple) {
Boolean result = delegate.mSetNX(tuple);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -578,7 +578,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean persist(byte[] key) {
Boolean result = delegate.persist(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -586,7 +586,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean move(byte[] key, int dbIndex) {
Boolean result = delegate.move(key, dbIndex);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -594,7 +594,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public String ping() {
String result = delegate.ping();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -606,7 +606,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long publish(byte[] channel, byte[] message) {
Long result = delegate.publish(channel, message);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -614,7 +614,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] randomKey() {
byte[] result = delegate.randomKey();
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -626,7 +626,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean renameNX(byte[] oldName, byte[] newName) {
Boolean result = delegate.renameNX(oldName, newName);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -638,7 +638,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] rPop(byte[] key) {
byte[] result = delegate.rPop(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -646,7 +646,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] rPopLPush(byte[] srcKey, byte[] dstKey) {
byte[] result = delegate.rPopLPush(srcKey, dstKey);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -654,7 +654,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long rPush(byte[] key, byte[]... values) {
Long result = delegate.rPush(key, values);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -662,7 +662,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long rPushX(byte[] key, byte[] value) {
Long result = delegate.rPushX(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -670,7 +670,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sAdd(byte[] key, byte[]... values) {
Long result = delegate.sAdd(key, values);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -682,7 +682,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sCard(byte[] key) {
Long result = delegate.sCard(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -690,7 +690,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set sDiff(byte[]... keys) {
Set results = delegate.sDiff(keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -698,7 +698,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sDiffStore(byte[] destKey, byte[]... keys) {
Long result = delegate.sDiffStore(destKey, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -726,7 +726,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean setNX(byte[] key, byte[] value) {
Boolean result = delegate.setNX(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -742,7 +742,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set sInter(byte[]... keys) {
Set results = delegate.sInter(keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -750,7 +750,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sInterStore(byte[] destKey, byte[]... keys) {
Long result = delegate.sInterStore(destKey, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -758,7 +758,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean sIsMember(byte[] key, byte[] value) {
Boolean result = delegate.sIsMember(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -766,7 +766,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set sMembers(byte[] key) {
Set results = delegate.sMembers(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -774,7 +774,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean sMove(byte[] srcKey, byte[] destKey, byte[] value) {
Boolean result = delegate.sMove(srcKey, destKey, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -782,7 +782,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sort(byte[] key, SortParameters params, byte[] storeKey) {
Long result = delegate.sort(key, params, storeKey);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -790,7 +790,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List sort(byte[] key, SortParameters params) {
List results = delegate.sort(key, params);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -798,7 +798,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] sPop(byte[] key) {
byte[] result = delegate.sPop(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -806,7 +806,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] sRandMember(byte[] key) {
byte[] result = delegate.sRandMember(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -814,7 +814,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List sRandMember(byte[] key, long count) {
List results = delegate.sRandMember(key, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -822,7 +822,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sRem(byte[] key, byte[]... values) {
Long result = delegate.sRem(key, values);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -830,7 +830,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long strLen(byte[] key) {
Long result = delegate.strLen(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -838,7 +838,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long bitCount(byte[] key) {
Long result = delegate.bitCount(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -846,7 +846,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long bitCount(byte[] key, long begin, long end) {
Long result = delegate.bitCount(key, begin, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -854,7 +854,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) {
Long result = delegate.bitOp(op, destination, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -866,7 +866,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set sUnion(byte[]... keys) {
Set results = delegate.sUnion(keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -874,7 +874,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long sUnionStore(byte[] destKey, byte[]... keys) {
Long result = delegate.sUnionStore(destKey, keys);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -882,7 +882,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long ttl(byte[] key) {
Long result = delegate.ttl(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -890,7 +890,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public DataType type(byte[] key) {
DataType result = delegate.type(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -906,7 +906,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean zAdd(byte[] key, double score, byte[] value) {
Boolean result = delegate.zAdd(key, score, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -914,7 +914,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zAdd(byte[] key, Set tuples) {
Long result = delegate.zAdd(key, tuples);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -922,7 +922,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zCard(byte[] key) {
Long result = delegate.zCard(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -930,7 +930,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zCount(byte[] key, double min, double max) {
Long result = delegate.zCount(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -938,7 +938,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double zIncrBy(byte[] key, double increment, byte[] value) {
Double result = delegate.zIncrBy(key, increment, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -946,7 +946,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) {
Long result = delegate.zInterStore(destKey, aggregate, weights, sets);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -954,7 +954,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zInterStore(byte[] destKey, byte[]... sets) {
Long result = delegate.zInterStore(destKey, sets);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -962,7 +962,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRange(byte[] key, long start, long end) {
Set results = delegate.zRange(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -970,7 +970,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRangeByScore(byte[] key, double min, double max, long offset, long count) {
Set results = delegate.zRangeByScore(key, min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -978,7 +978,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRangeByScore(byte[] key, double min, double max) {
Set results = delegate.zRangeByScore(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -986,7 +986,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) {
Set results = delegate.zRangeByScoreWithScores(key, min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -994,7 +994,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRangeByScoreWithScores(byte[] key, double min, double max) {
Set results = delegate.zRangeByScoreWithScores(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1002,7 +1002,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRangeWithScores(byte[] key, long start, long end) {
Set results = delegate.zRangeWithScores(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1010,7 +1010,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScore(byte[] key, double min, double max, long offset, long count) {
Set results = delegate.zRevRangeByScore(key, min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1018,7 +1018,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScore(byte[] key, double min, double max) {
Set results = delegate.zRevRangeByScore(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1026,7 +1026,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count) {
Set results = delegate.zRevRangeByScoreWithScores(key, min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1034,7 +1034,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScoreWithScores(byte[] key, double min, double max) {
Set results = delegate.zRevRangeByScoreWithScores(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1042,7 +1042,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRank(byte[] key, byte[] value) {
Long result = delegate.zRank(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1050,7 +1050,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRem(byte[] key, byte[]... values) {
Long result = delegate.zRem(key, values);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1058,7 +1058,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRemRange(byte[] key, long start, long end) {
Long result = delegate.zRemRange(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1066,7 +1066,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRemRangeByScore(byte[] key, double min, double max) {
Long result = delegate.zRemRangeByScore(key, min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1074,7 +1074,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRange(byte[] key, long start, long end) {
Set results = delegate.zRevRange(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1082,7 +1082,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeWithScores(byte[] key, long start, long end) {
Set results = delegate.zRevRangeWithScores(key, start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1090,7 +1090,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRevRank(byte[] key, byte[] value) {
Long result = delegate.zRevRank(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1098,7 +1098,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double zScore(byte[] key, byte[] value) {
Double result = delegate.zScore(key, value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1106,7 +1106,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zUnionStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets) {
Long result = delegate.zUnionStore(destKey, aggregate, weights, sets);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1114,7 +1114,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zUnionStore(byte[] destKey, byte[]... sets) {
Long result = delegate.zUnionStore(destKey, sets);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1122,7 +1122,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean pExpire(byte[] key, long millis) {
Boolean result = delegate.pExpire(key, millis);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1130,7 +1130,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Boolean pExpireAt(byte[] key, long unixTimeInMillis) {
Boolean result = delegate.pExpireAt(key, unixTimeInMillis);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1138,7 +1138,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long pTtl(byte[] key) {
Long result = delegate.pTtl(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1146,7 +1146,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public byte[] dump(byte[] key) {
byte[] result = delegate.dump(key);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1166,7 +1166,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public String scriptLoad(byte[] script) {
String result = delegate.scriptLoad(script);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1174,7 +1174,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List scriptExists(String... scriptSha1) {
List results = delegate.scriptExists(scriptSha1);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return results;
@@ -1182,7 +1182,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs) {
T result = delegate.eval(script, returnType, numKeys, keysAndArgs);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1190,7 +1190,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public T evalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs) {
T result = delegate.evalSha(scriptSha1, returnType, numKeys, keysAndArgs);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1216,7 +1216,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
private Map serialize(Map hashes) {
Map ret = new LinkedHashMap(hashes.size());
-
+
for (Map.Entry entry : hashes.entrySet()) {
ret.put(serializer.serialize(entry.getKey()), serializer.serialize(entry.getValue()));
}
@@ -1224,181 +1224,161 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
return ret;
}
-
public Long append(String key, String value) {
Long result = delegate.append(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public List bLPop(int timeout, String... keys) {
List results = delegate.bLPop(timeout, serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public List bRPop(int timeout, String... keys) {
List results = delegate.bRPop(timeout, serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public String bRPopLPush(int timeout, String srcKey, String dstKey) {
byte[] result = delegate.bRPopLPush(timeout, serialize(srcKey), serialize(dstKey));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Long decr(String key) {
Long result = delegate.decr(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long decrBy(String key, long value) {
Long result = delegate.decrBy(serialize(key), value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long del(String... keys) {
Long result = delegate.del(serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String echo(String message) {
byte[] result = delegate.echo(serialize(message));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Boolean exists(String key) {
Boolean result = delegate.exists(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean expire(String key, long seconds) {
Boolean result = delegate.expire(serialize(key), seconds);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean expireAt(String key, long unixTime) {
Boolean result = delegate.expireAt(serialize(key), unixTime);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String get(String key) {
byte[] result = delegate.get(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Boolean getBit(String key, long offset) {
Boolean result = delegate.getBit(serialize(key), offset);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String getRange(String key, long start, long end) {
byte[] result = delegate.getRange(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public String getSet(String key, String value) {
byte[] result = delegate.getSet(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Long hDel(String key, String... fields) {
Long result = delegate.hDel(serialize(key), serializeMulti(fields));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean hExists(String key, String field) {
Boolean result = delegate.hExists(serialize(key), serialize(field));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String hGet(String key, String field) {
byte[] result = delegate.hGet(serialize(key), serialize(field));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Map hGetAll(String key) {
- Map results = delegate.hGetAll(serialize(key));
- if(isFutureConversion()) {
+ Map results = delegate.hGetAll(serialize(key));
+ if (isFutureConversion()) {
addResultConverter(byteMapToStringMap);
}
return byteMapToStringMap.convert(results);
}
-
public Long hIncrBy(String key, String field, long delta) {
Long result = delegate.hIncrBy(serialize(key), serialize(field), delta);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1406,82 +1386,75 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double hIncrBy(String key, String field, double delta) {
Double result = delegate.hIncrBy(serialize(key), serialize(field), delta);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
+
public Set hKeys(String key) {
Set results = delegate.hKeys(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Long hLen(String key) {
Long result = delegate.hLen(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public List hMGet(String key, String... fields) {
List results = delegate.hMGet(serialize(key), serializeMulti(fields));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
+
public void hMSet(String key, Map hashes) {
delegate.hMSet(serialize(key), serialize(hashes));
}
-
public Boolean hSet(String key, String field, String value) {
Boolean result = delegate.hSet(serialize(key), serialize(field), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean hSetNX(String key, String field, String value) {
Boolean result = delegate.hSetNX(serialize(key), serialize(field), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public List hVals(String key) {
List results = delegate.hVals(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public Long incr(String key) {
Long result = delegate.incr(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long incrBy(String key, long value) {
Long result = delegate.incrBy(serialize(key), value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1489,7 +1462,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Double incrBy(String key, double value) {
Double result = delegate.incrBy(serialize(key), value);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1497,340 +1470,299 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Collection keys(String pattern) {
Set results = delegate.keys(serialize(pattern));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public String lIndex(String key, long index) {
byte[] result = delegate.lIndex(serialize(key), index);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Long lInsert(String key, Position where, String pivot, String value) {
Long result = delegate.lInsert(serialize(key), where, serialize(pivot), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long lLen(String key) {
Long result = delegate.lLen(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String lPop(String key) {
byte[] result = delegate.lPop(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Long lPush(String key, String... values) {
Long result = delegate.lPush(serialize(key), serializeMulti(values));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long lPushX(String key, String value) {
Long result = delegate.lPushX(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public List lRange(String key, long start, long end) {
List results = delegate.lRange(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public Long lRem(String key, long count, String value) {
Long result = delegate.lRem(serialize(key), count, serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void lSet(String key, long index, String value) {
delegate.lSet(serialize(key), index, serialize(value));
}
-
public void lTrim(String key, long start, long end) {
delegate.lTrim(serialize(key), start, end);
}
-
public List mGet(String... keys) {
List results = delegate.mGet(serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public Boolean mSetNXString(Map tuple) {
Boolean result = delegate.mSetNX(serialize(tuple));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void mSetString(Map tuple) {
delegate.mSet(serialize(tuple));
}
-
public Boolean persist(String key) {
Boolean result = delegate.persist(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean move(String key, int dbIndex) {
Boolean result = delegate.move(serialize(key), dbIndex);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void pSubscribe(MessageListener listener, String... patterns) {
delegate.pSubscribe(listener, serializeMulti(patterns));
}
-
public Long publish(String channel, String message) {
Long result = delegate.publish(serialize(channel), serialize(message));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void rename(String oldName, String newName) {
delegate.rename(serialize(oldName), serialize(newName));
}
-
public Boolean renameNX(String oldName, String newName) {
Boolean result = delegate.renameNX(serialize(oldName), serialize(newName));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public String rPop(String key) {
byte[] result = delegate.rPop(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public String rPopLPush(String srcKey, String dstKey) {
byte[] result = delegate.rPopLPush(serialize(srcKey), serialize(dstKey));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public Long rPush(String key, String... values) {
Long result = delegate.rPush(serialize(key), serializeMulti(values));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long rPushX(String key, String value) {
Long result = delegate.rPushX(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long sAdd(String key, String... values) {
Long result = delegate.sAdd(serialize(key), serializeMulti(values));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long sCard(String key) {
Long result = delegate.sCard(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Set sDiff(String... keys) {
Set results = delegate.sDiff(serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Long sDiffStore(String destKey, String... keys) {
Long result = delegate.sDiffStore(serialize(destKey), serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void set(String key, String value) {
delegate.set(serialize(key), serialize(value));
}
-
public void setBit(String key, long offset, boolean value) {
delegate.setBit(serialize(key), offset, value);
}
-
public void setEx(String key, long seconds, String value) {
delegate.setEx(serialize(key), seconds, serialize(value));
}
-
public Boolean setNX(String key, String value) {
Boolean result = delegate.setNX(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public void setRange(String key, String value, long start) {
delegate.setRange(serialize(key), serialize(value), start);
}
-
public Set sInter(String... keys) {
Set results = delegate.sInter(serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Long sInterStore(String destKey, String... keys) {
Long result = delegate.sInterStore(serialize(destKey), serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean sIsMember(String key, String value) {
Boolean result = delegate.sIsMember(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Set sMembers(String key) {
Set results = delegate.sMembers(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Boolean sMove(String srcKey, String destKey, String value) {
Boolean result = delegate.sMove(serialize(srcKey), serialize(destKey), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long sort(String key, SortParameters params, String storeKey) {
Long result = delegate.sort(serialize(key), params, serialize(storeKey));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public List sort(String key, SortParameters params) {
List results = delegate.sort(serialize(key), params);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
public String sPop(String key) {
byte[] result = delegate.sPop(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
}
-
public String sRandMember(String key) {
byte[] result = delegate.sRandMember(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(bytesToString);
}
return bytesToString.convert(result);
@@ -1838,31 +1770,31 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public List sRandMember(String key, long count) {
List results = delegate.sRandMember(serialize(key), count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteListToStringList);
}
return byteListToStringList.convert(results);
}
-
+
public Long sRem(String key, String... values) {
Long result = delegate.sRem(serialize(key), serializeMulti(values));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
+
public Long strLen(String key) {
Long result = delegate.strLen(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
+
public Long bitCount(String key) {
Long result = delegate.bitCount(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1870,7 +1802,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long bitCount(String key, long begin, long end) {
Long result = delegate.bitCount(serialize(key), begin, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1878,7 +1810,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long bitOp(BitOperation op, String destination, String... keys) {
Long result = delegate.bitOp(op, serialize(destination), serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -1888,215 +1820,193 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
delegate.subscribe(listener, serializeMulti(channels));
}
-
public Set sUnion(String... keys) {
Set results = delegate.sUnion(serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Long sUnionStore(String destKey, String... keys) {
Long result = delegate.sUnionStore(serialize(destKey), serializeMulti(keys));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long ttl(String key) {
Long result = delegate.ttl(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public DataType type(String key) {
DataType result = delegate.type(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Boolean zAdd(String key, double score, String value) {
Boolean result = delegate.zAdd(serialize(key), score, serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zAdd(String key, Set tuples) {
Long result = delegate.zAdd(serialize(key), stringTupleToTuple.convert(tuples));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
+
public Long zCard(String key) {
Long result = delegate.zCard(serialize(key));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zCount(String key, double min, double max) {
Long result = delegate.zCount(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Double zIncrBy(String key, double increment, String value) {
Double result = delegate.zIncrBy(serialize(key), increment, serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zInterStore(String destKey, Aggregate aggregate, int[] weights, String... sets) {
Long result = delegate.zInterStore(serialize(destKey), aggregate, weights, serializeMulti(sets));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zInterStore(String destKey, String... sets) {
Long result = delegate.zInterStore(serialize(destKey), serializeMulti(sets));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Set zRange(String key, long start, long end) {
Set results = delegate.zRange(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Set zRangeByScore(String key, double min, double max, long offset, long count) {
Set results = delegate.zRangeByScore(serialize(key), min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Set zRangeByScore(String key, double min, double max) {
Set results = delegate.zRangeByScore(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Set zRangeByScoreWithScores(String key, double min, double max, long offset, long count) {
Set results = delegate.zRangeByScoreWithScores(serialize(key), min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
}
-
public Set zRangeByScoreWithScores(String key, double min, double max) {
Set results = delegate.zRangeByScoreWithScores(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
}
-
public Set zRangeWithScores(String key, long start, long end) {
Set results = delegate.zRangeWithScores(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
}
-
public Long zRank(String key, String value) {
Long result = delegate.zRank(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zRem(String key, String... values) {
Long result = delegate.zRem(serialize(key), serializeMulti(values));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zRemRange(String key, long start, long end) {
Long result = delegate.zRemRange(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zRemRangeByScore(String key, double min, double max) {
Long result = delegate.zRemRangeByScore(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Set zRevRange(String key, long start, long end) {
Set results = delegate.zRevRange(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
-
public Set zRevRangeWithScores(String key, long start, long end) {
Set results = delegate.zRevRangeWithScores(serialize(key), start, end);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
}
-
+
public Set zRevRangeByScore(String key, double min, double max) {
Set results = delegate.zRevRangeByScore(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
@@ -2104,7 +2014,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScoreWithScores(String key, double min, double max) {
Set results = delegate.zRevRangeByScoreWithScores(serialize(key), min, max);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
@@ -2112,16 +2022,15 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Set zRevRangeByScore(String key, double min, double max, long offset, long count) {
Set results = delegate.zRevRangeByScore(serialize(key), min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(byteSetToStringSet);
}
return byteSetToStringSet.convert(results);
}
- public Set zRevRangeByScoreWithScores(String key, double min, double max,
- long offset, long count) {
+ public Set zRevRangeByScoreWithScores(String key, double min, double max, long offset, long count) {
Set results = delegate.zRevRangeByScoreWithScores(serialize(key), min, max, offset, count);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(tupleToStringTuple);
}
return tupleToStringTuple.convert(results);
@@ -2129,34 +2038,31 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Long zRevRank(String key, String value) {
Long result = delegate.zRevRank(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Double zScore(String key, String value) {
Double result = delegate.zScore(serialize(key), serialize(value));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zUnionStore(String destKey, Aggregate aggregate, int[] weights, String... sets) {
Long result = delegate.zUnionStore(serialize(destKey), aggregate, weights, serializeMulti(sets));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
-
public Long zUnionStore(String destKey, String... sets) {
Long result = delegate.zUnionStore(serialize(destKey), serializeMulti(sets));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -2174,7 +2080,6 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
return delegate.isPipelined();
}
-
public void openPipeline() {
delegate.openPipeline();
}
@@ -2185,7 +2090,7 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public Object execute(String command, byte[]... args) {
Object result = delegate.execute(command, args);
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
@@ -2209,51 +2114,48 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
public String scriptLoad(String script) {
String result = delegate.scriptLoad(serialize(script));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
/**
- * NOTE: This method will not deserialize Strings returned by Lua scripts, as
- * they may not be encoded with the same serializer used here. They will
- * be returned as byte[]s
+ * NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same
+ * serializer used here. They will be returned as byte[]s
*/
public T eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs) {
T result = delegate.eval(serialize(script), returnType, numKeys, serializeMulti(keysAndArgs));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
/**
- * NOTE: This method will not deserialize Strings returned by Lua scripts, as
- * they may not be encoded with the same serializer used here. They will
- * be returned as byte[]s
+ * NOTE: This method will not deserialize Strings returned by Lua scripts, as they may not be encoded with the same
+ * serializer used here. They will be returned as byte[]s
*/
public T evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs) {
T result = delegate.evalSha(scriptSha1, returnType, numKeys, serializeMulti(keysAndArgs));
- if(isFutureConversion()) {
+ if (isFutureConversion()) {
addResultConverter(identityConverter);
}
return result;
}
/**
- * Specifies if pipelined and tx results should be deserialized to Strings.
- * If false, results of {@link #closePipeline()} and {@link #exec()} will be of the
- * type returned by the underlying connection
- *
+ * Specifies if pipelined and tx results should be deserialized to Strings. If false, results of
+ * {@link #closePipeline()} and {@link #exec()} will be of the type returned by the underlying connection
+ *
* @param deserializePipelineAndTxResults Whether or not to deserialize pipeline and tx results
*/
public void setDeserializePipelineAndTxResults(boolean deserializePipelineAndTxResults) {
this.deserializePipelineAndTxResults = deserializePipelineAndTxResults;
}
- private void addResultConverter(Converter,?> converter) {
- if(isQueueing()) {
+ private void addResultConverter(Converter, ?> converter) {
+ if (isQueueing()) {
txConverters.add(converter);
} else {
pipelineConverters.add(converter);
@@ -2261,23 +2163,23 @@ public class DefaultStringRedisConnection implements StringRedisConnection {
}
private boolean isFutureConversion() {
- return isPipelined() || isQueueing();
- }
+ return isPipelined() || isQueueing();
+ }
@SuppressWarnings({ "unchecked", "rawtypes" })
private List convertResults(List results, Queue converters) {
- if(!deserializePipelineAndTxResults || results == null) {
+ if (!deserializePipelineAndTxResults || results == null) {
return results;
}
- if(results.size() != converters.size()) {
+ if (results.size() != converters.size()) {
// Some of the commands were done directly on the delegate, don't attempt to convert
log.warn("Delegate returned an unexpected number of results. Abandoning type conversion.");
return results;
}
List convertedResults = new ArrayList();
- for(Object result: results) {
+ for (Object result : results) {
convertedResults.add(converters.remove().convert(result));
}
return convertedResults;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java b/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
index acbe48792..80f79daf5 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
@@ -20,7 +20,7 @@ import org.springframework.data.redis.connection.StringRedisConnection.StringTup
/**
* Default implementation for {@link StringTuple} interface.
- *
+ *
* @author Costin Leau
*/
public class DefaultStringTuple extends DefaultTuple implements StringTuple {
@@ -29,7 +29,7 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
/**
* Constructs a new DefaultStringTuple instance.
- *
+ *
* @param value
* @param score
*/
@@ -41,7 +41,7 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
/**
* Constructs a new DefaultStringTuple instance.
- *
+ *
* @param tuple
* @param valueAsString
*/
@@ -50,12 +50,10 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
this.valueAsString = valueAsString;
}
-
public String getValueAsString() {
return valueAsString;
}
-
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
@@ -63,7 +61,6 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
return result;
}
-
public boolean equals(Object obj) {
if (super.equals(obj)) {
if (!(obj instanceof DefaultStringTuple))
@@ -72,8 +69,7 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
if (valueAsString == null) {
if (other.valueAsString != null)
return false;
- }
- else if (!valueAsString.equals(other.valueAsString))
+ } else if (!valueAsString.equals(other.valueAsString))
return false;
return true;
}
@@ -83,4 +79,4 @@ public class DefaultStringTuple extends DefaultTuple implements StringTuple {
public String toString() {
return "DefaultStringTuple[value=" + getValueAsString() + ", score=" + getScore() + "]";
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultTuple.java b/src/main/java/org/springframework/data/redis/connection/DefaultTuple.java
index 91ff287a9..de2fd984f 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultTuple.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultTuple.java
@@ -29,10 +29,9 @@ public class DefaultTuple implements Tuple {
private final Double score;
private final byte[] value;
-
/**
* Constructs a new DefaultTuple instance.
- *
+ *
* @param value
* @param score
*/
@@ -41,17 +40,14 @@ public class DefaultTuple implements Tuple {
this.value = value;
}
-
public Double getScore() {
return score;
}
-
public byte[] getValue() {
return value;
}
-
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -63,15 +59,13 @@ public class DefaultTuple implements Tuple {
if (score == null) {
if (other.score != null)
return false;
- }
- else if (!score.equals(other.score))
+ } else if (!score.equals(other.score))
return false;
if (!Arrays.equals(value, other.value))
return false;
return true;
}
-
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -80,10 +74,9 @@ public class DefaultTuple implements Tuple {
return result;
}
-
public int compareTo(Double o) {
Double d = (score == null ? Double.valueOf(0.0d) : score);
Double a = (o == null ? Double.valueOf(0.0d) : o);
return d.compareTo(a);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/FutureResult.java b/src/main/java/org/springframework/data/redis/connection/FutureResult.java
index 2a1f82e19..c3e78689d 100644
--- a/src/main/java/org/springframework/data/redis/connection/FutureResult.java
+++ b/src/main/java/org/springframework/data/redis/connection/FutureResult.java
@@ -19,11 +19,9 @@ import org.springframework.core.convert.converter.Converter;
/**
* The result of an asynchronous operation
- *
+ *
* @author Jennifer Hickey
- *
- * @param
- * The data type of the object that holds the future result (usually of type Future)
+ * @param The data type of the object that holds the future result (usually of type Future)
*/
abstract public class FutureResult {
@@ -31,8 +29,7 @@ abstract public class FutureResult {
protected boolean status = false;
- @SuppressWarnings("rawtypes")
- protected Converter converter;
+ @SuppressWarnings("rawtypes") protected Converter converter;
public FutureResult(T resultHolder) {
this.resultHolder = resultHolder;
@@ -50,9 +47,8 @@ abstract public class FutureResult {
/**
* Converts the given result if a converter is specified, else returns the result
- *
- * @param result
- * The result to convert
+ *
+ * @param result The result to convert
* @return The converted result
*/
@SuppressWarnings("unchecked")
@@ -69,9 +65,8 @@ abstract public class FutureResult {
}
/**
- * Indicates if this result is the status of an operation. Typically status results will be
- * discarded on conversion.
- *
+ * Indicates if this result is the status of an operation. Typically status results will be discarded on conversion.
+ *
* @return true if this is a status result (i.e. OK)
*/
public boolean isStatus() {
@@ -79,9 +74,8 @@ abstract public class FutureResult {
}
/**
- * Indicates if this result is the status of an operation. Typically status results will be
- * discarded on conversion.
- *
+ * Indicates if this result is the status of an operation. Typically status results will be discarded on conversion.
+ *
* @return true if this is a status result (i.e. OK)
*/
public void setStatus(boolean status) {
diff --git a/src/main/java/org/springframework/data/redis/connection/Message.java b/src/main/java/org/springframework/data/redis/connection/Message.java
index 69109ef00..1547fb1f6 100644
--- a/src/main/java/org/springframework/data/redis/connection/Message.java
+++ b/src/main/java/org/springframework/data/redis/connection/Message.java
@@ -26,11 +26,11 @@ public interface Message extends Serializable {
/**
* Returns the body (or the payload) of the message.
- *
+ *
* @return message body
*/
byte[] getBody();
-
+
/**
* Returns the channel associated with the message.
*
diff --git a/src/main/java/org/springframework/data/redis/connection/Pool.java b/src/main/java/org/springframework/data/redis/connection/Pool.java
index 104f8c66d..990fa2926 100644
--- a/src/main/java/org/springframework/data/redis/connection/Pool.java
+++ b/src/main/java/org/springframework/data/redis/connection/Pool.java
@@ -15,32 +15,25 @@
*/
package org.springframework.data.redis.connection;
-
/**
* Pool of resources
*
* @author Jennifer Hickey
- *
*/
public interface Pool {
/**
- *
* @return A resource, if available
*/
T getResource();
/**
- *
- * @param resource
- * A broken resource that should be invalidated
+ * @param resource A broken resource that should be invalidated
*/
void returnBrokenResource(final T resource);
/**
- *
- * @param resource
- * A resource to return to the pool
+ * @param resource A resource to return to the pool
*/
void returnResource(final T resource);
diff --git a/src/main/java/org/springframework/data/redis/connection/PoolException.java b/src/main/java/org/springframework/data/redis/connection/PoolException.java
index 4bb1d6307..a8abd7168 100644
--- a/src/main/java/org/springframework/data/redis/connection/PoolException.java
+++ b/src/main/java/org/springframework/data/redis/connection/PoolException.java
@@ -21,7 +21,6 @@ import org.springframework.core.NestedRuntimeException;
* Exception thrown when there are issues with a resource pool
*
* @author Jennifer Hickey
- *
*/
@SuppressWarnings("serial")
public class PoolException extends NestedRuntimeException {
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
index 2a9b68cdc..24283111a 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
@@ -16,7 +16,6 @@
package org.springframework.data.redis.connection;
-
/**
* Interface for the commands supported by Redis.
*
@@ -26,15 +25,14 @@ public interface RedisCommands extends RedisKeyCommands, RedisStringCommands, Re
RedisZSetCommands, RedisHashCommands, RedisTxCommands, RedisPubSubCommands, RedisConnectionCommands,
RedisServerCommands, RedisScriptingCommands {
-
/**
- * 'Native' or 'raw' execution of the given command along-side the given arguments.
- * The command is executed as is, with as little 'interpretation' as possible - it is up to the caller
- * to take care of any processing of arguments or the result.
+ * 'Native' or 'raw' execution of the given command along-side the given arguments. The command is executed as is,
+ * with as little 'interpretation' as possible - it is up to the caller to take care of any processing of arguments or
+ * the result.
*
* @param command Command to execute
* @param args Possible command arguments (may be null)
* @return execution result.
*/
Object execute(String command, byte[]... args);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnection.java b/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
index ebcab7d17..a445696dd 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
@@ -21,10 +21,8 @@ import java.util.List;
import org.springframework.dao.DataAccessException;
/**
- * A connection to a Redis server. Acts as an common abstraction across various
- * Redis client libraries (or drivers). Additionally performs exception translation
- * between the underlying Redis client library and Spring DAO exceptions.
- *
+ * A connection to a Redis server. Acts as an common abstraction across various Redis client libraries (or drivers).
+ * Additionally performs exception translation between the underlying Redis client library and Spring DAO exceptions.
* The methods follow as much as possible the Redis names and conventions.
*
* @author Costin Leau
@@ -33,7 +31,7 @@ public interface RedisConnection extends RedisCommands {
/**
* Closes (or quits) the connection.
- *
+ *
* @throws DataAccessException
*/
void close() throws DataAccessException;
@@ -53,11 +51,9 @@ public interface RedisConnection extends RedisCommands {
Object getNativeConnection();
/**
- * Indicates whether the connection is in "queue"(or "MULTI") mode or not.
- * When queueing, all commands are postponed until EXEC or DISCARD commands
- * are issued.
- * Since in queueing no results are returned, the connection will return NULL
- * on all operations that interact with the data.
+ * Indicates whether the connection is in "queue"(or "MULTI") mode or not. When queueing, all commands are postponed
+ * until EXEC or DISCARD commands are issued. Since in queueing no results are returned, the connection will return
+ * NULL on all operations that interact with the data.
*
* @return true if the connection is in queue/MULTI mode, false otherwise
*/
@@ -65,7 +61,7 @@ public interface RedisConnection extends RedisCommands {
/**
* Indicates whether the connection is currently pipelined or not.
- *
+ *
* @return true if the connection is pipelined, false otherwise
* @see #openPipeline()
* @see #isQueueing()
@@ -73,28 +69,27 @@ public interface RedisConnection extends RedisCommands {
boolean isPipelined();
/**
- * Activates the pipeline mode for this connection. When pipelined, all commands return null
- * (the reply is read at the end through {@link #closePipeline()}.
- * Calling this method when the connection is already pipelined has no effect.
- *
- * Pipelining is used for issuing commands without requesting the response right away but rather
- * at the end of the batch. While somewhat similar to MULTI, pipelining does not
- * guarantee atomicity - it only tries to improve performance when issuing a lot of
- * commands (such as in batching scenarios).
- *
- * Note:
Consider doing some performance testing before using this feature since
- * in many cases the performance benefits are minimal yet the impact on usage are not.
+ * Activates the pipeline mode for this connection. When pipelined, all commands return null (the reply is read at the
+ * end through {@link #closePipeline()}. Calling this method when the connection is already pipelined has no effect.
+ * Pipelining is used for issuing commands without requesting the response right away but rather at the end of the
+ * batch. While somewhat similar to MULTI, pipelining does not guarantee atomicity - it only tries to improve
+ * performance when issuing a lot of commands (such as in batching scenarios).
+ *
+ * Note:
+ *
+ * Consider doing some performance testing before using this feature since in many cases the performance benefits are
+ * minimal yet the impact on usage are not.
*
* @see #multi()
*/
void openPipeline();
/**
- * Executes the commands in the pipeline and returns their result.
- * If the connection is not pipelined, an empty collection is returned.
+ * Executes the commands in the pipeline and returns their result. If the connection is not pipelined, an empty
+ * collection is returned.
*
* @throws RedisPipelineException if the pipeline contains any incorrect/invalid statements
* @return the result of the executed commands.
*/
List closePipeline() throws RedisPipelineException;
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
index 85994d486..689d0ff0a 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
@@ -15,7 +15,6 @@
*/
package org.springframework.data.redis.connection;
-
/**
* Connection-specific commands supported by Redis.
*
@@ -28,4 +27,4 @@ public interface RedisConnectionCommands {
byte[] echo(byte[] message);
String ping();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java b/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
index 1f3136abc..6c0df25da 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
@@ -33,14 +33,11 @@ public interface RedisConnectionFactory extends PersistenceExceptionTranslator {
RedisConnection getConnection();
/**
- * Specifies if pipelined results should be converted to the expected data
- * type. If false, results of {@link RedisConnection#closePipeline()} and {RedisConnection#exec()}
- * will be of the type returned by the underlying driver
- *
- * This method is mostly for backwards compatibility with 1.0. It is generally
- * always a good idea to allow results to be converted and deserialized.
- * In fact, this is now the default behavior.
- *
+ * Specifies if pipelined results should be converted to the expected data type. If false, results of
+ * {@link RedisConnection#closePipeline()} and {RedisConnection#exec()} will be of the type returned by the underlying
+ * driver This method is mostly for backwards compatibility with 1.0. It is generally always a good idea to allow
+ * results to be converted and deserialized. In fact, this is now the default behavior.
+ *
* @return Whether or not to convert pipeline and tx results
*/
boolean getConvertPipelineAndTxResults();
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java b/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
index 450d452e0..0ce8448b5 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
@@ -26,7 +26,7 @@ public class RedisInvalidSubscriptionException extends InvalidDataAccessResource
/**
* Constructs a new RedisInvalidSubscriptionException instance.
- *
+ *
* @param msg
* @param cause
*/
@@ -36,7 +36,7 @@ public class RedisInvalidSubscriptionException extends InvalidDataAccessResource
/**
* Constructs a new RedisInvalidSubscriptionException instance.
- *
+ *
* @param msg
*/
public RedisInvalidSubscriptionException(String msg) {
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
index 7e2c3d638..9737239fb 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
@@ -18,7 +18,6 @@ package org.springframework.data.redis.connection;
import java.util.List;
import java.util.Set;
-
/**
* Key-specific commands supported by Redis.
*
@@ -64,4 +63,4 @@ public interface RedisKeyCommands {
byte[] dump(byte[] key);
void restore(byte[] key, long ttlInMillis, byte[] serializedValue);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
index d300f988d..abf7dafcd 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
@@ -26,14 +26,14 @@ import java.util.List;
public interface RedisListCommands {
/**
- * List insertion position.
+ * List insertion position.
*/
public enum Position {
BEFORE, AFTER
}
Long rPush(byte[] key, byte[]... values);
-
+
Long lPush(byte[] key, byte[]... value);
Long rPushX(byte[] key, byte[] value);
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java b/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
index 2b0239834..bf51783cd 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
@@ -22,11 +22,11 @@ import java.util.List;
import org.springframework.dao.InvalidDataAccessResourceUsageException;
/**
- * Exception thrown when executing/closing a pipeline that contains one or multiple invalid/incorrect statements.
- * The exception might also contain the pipeline result (if the driver returns it), allowing for analysis and tracing.
+ * Exception thrown when executing/closing a pipeline that contains one or multiple invalid/incorrect statements. The
+ * exception might also contain the pipeline result (if the driver returns it), allowing for analysis and tracing.
*
* Typically, the first exception returned by the pipeline is used as the cause of this exception for easier
- * debugging.
+ * debugging.
*
* @author Costin Leau
*/
@@ -36,7 +36,7 @@ public class RedisPipelineException extends InvalidDataAccessResourceUsageExcept
/**
* Constructs a new RedisPipelineException instance.
- *
+ *
* @param msg the message
* @param cause the cause
* @param pipelineResult the pipeline result
@@ -48,7 +48,7 @@ public class RedisPipelineException extends InvalidDataAccessResourceUsageExcept
/**
* Constructs a new RedisPipelineException instance using a default message.
- *
+ *
* @param cause the cause
* @param pipelineResult the pipeline result
*/
@@ -57,9 +57,9 @@ public class RedisPipelineException extends InvalidDataAccessResourceUsageExcept
}
/**
- * Constructs a new RedisPipelineException instance using a default message
- * and an empty pipeline result list.
- *
+ * Constructs a new RedisPipelineException instance using a default message and an empty pipeline result
+ * list.
+ *
* @param cause the cause
*/
public RedisPipelineException(Exception cause) {
@@ -78,13 +78,12 @@ public class RedisPipelineException extends InvalidDataAccessResourceUsageExcept
}
/**
- * Optionally returns the result of the pipeline that caused the exception.
- * Typically contains both the results of the successful statements but also
- * the exceptions of the incorrect ones.
+ * Optionally returns the result of the pipeline that caused the exception. Typically contains both the results of the
+ * successful statements but also the exceptions of the incorrect ones.
*
* @return result of the pipeline
*/
public List getPipelineResult() {
return results;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
index 0a9b4edbf..ca63e1591 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
@@ -23,16 +23,14 @@ package org.springframework.data.redis.connection;
public interface RedisPubSubCommands {
/**
- * Indicates whether the current connection is subscribed (to at least one channel)
- * or not.
+ * Indicates whether the current connection is subscribed (to at least one channel) or not.
*
* @return true if the connection is subscribed, false otherwise
*/
boolean isSubscribed();
/**
- * Returns the current subscription for this connection or null if the connection is
- * not subscribed.
+ * Returns the current subscription for this connection or null if the connection is not subscribed.
*
* @return the current subscription, null if none is available
*/
@@ -48,13 +46,10 @@ public interface RedisPubSubCommands {
Long publish(byte[] channel, byte[] message);
/**
- * Subscribes the connection to the given channels.
- * Once subscribed, a connection
- * enters listening mode and can only subscribe to other channels or unsubscribe.
- * No other commands are accepted until the connection is unsubscribed.
+ * Subscribes the connection to the given channels. Once subscribed, a connection enters listening mode and can only
+ * subscribe to other channels or unsubscribe. No other commands are accepted until the connection is unsubscribed.
*
- * Note that this operation is blocking and the current thread starts waiting
- * for new messages immediately.
+ * Note that this operation is blocking and the current thread starts waiting for new messages immediately.
*
* @param listener message listener
* @param channels channel names
@@ -62,16 +57,14 @@ public interface RedisPubSubCommands {
void subscribe(MessageListener listener, byte[]... channels);
/**
- * Subscribes the connection to all channels matching the given patterns.
- * Once subscribed, a connection
- * enters listening mode and can only subscribe to other channels or unsubscribe.
- * No other commands are accepted until the connection is unsubscribed.
+ * Subscribes the connection to all channels matching the given patterns. Once subscribed, a connection enters
+ * listening mode and can only subscribe to other channels or unsubscribe. No other commands are accepted until the
+ * connection is unsubscribed.
*
- * Note that this operation is blocking and the current thread starts waiting
- * for new messages immediately.
+ * Note that this operation is blocking and the current thread starts waiting for new messages immediately.
*
* @param listener message listener
* @param patterns channel name patterns
*/
void pSubscribe(MessageListener listener, byte[]... patterns);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
index cd836dcf8..8012b67df 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
@@ -25,15 +25,15 @@ import java.util.List;
*/
public interface RedisScriptingCommands {
- void scriptFlush();
+ void scriptFlush();
- void scriptKill();
+ void scriptKill();
- String scriptLoad(byte[] script);
+ String scriptLoad(byte[] script);
- List scriptExists(String... scriptSha1);
+ List scriptExists(String... scriptSha1);
- T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
+ T eval(byte[] script, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
- T evalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
-}
\ No newline at end of file
+ T evalSha(String scriptSha1, ReturnType returnType, int numKeys, byte[]... keysAndArgs);
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java b/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
index 752ec2834..b87d9cea9 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
@@ -18,8 +18,7 @@ package org.springframework.data.redis.connection;
import org.springframework.dao.InvalidDataAccessApiUsageException;
/**
- * Exception thrown when issuing commands on a connection that is subscribed and waiting
- * for events.
+ * Exception thrown when issuing commands on a connection that is subscribed and waiting for events.
*
* @author Costin Leau
* @see org.springframework.data.redis.connection.RedisPubSubCommands
@@ -28,7 +27,7 @@ public class RedisSubscribedConnectionException extends InvalidDataAccessApiUsag
/**
* Constructs a new RedisSubscribedConnectionException instance.
- *
+ *
* @param msg
* @param cause
*/
@@ -38,7 +37,7 @@ public class RedisSubscribedConnectionException extends InvalidDataAccessApiUsag
/**
* Constructs a new RedisSubscribedConnectionException instance.
- *
+ *
* @param msg
*/
public RedisSubscribedConnectionException(String msg) {
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
index ee809f5ef..b4631ac0a 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
@@ -17,7 +17,6 @@ package org.springframework.data.redis.connection;
import java.util.List;
-
/**
* Transaction/Batch specific commands supported by Redis.
*
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
index 8652d596a..2b331d00a 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
@@ -18,7 +18,6 @@ package org.springframework.data.redis.connection;
import java.util.Set;
-
/**
* ZSet(SortedSet)-specific commands supported by Redis.
*
@@ -27,14 +26,14 @@ import java.util.Set;
public interface RedisZSetCommands {
/**
- * Sort aggregation operations.
+ * Sort aggregation operations.
*/
public enum Aggregate {
SUM, MIN, MAX;
}
/**
- * ZSet tuple.
+ * ZSet tuple.
*/
public interface Tuple extends Comparable {
byte[] getValue();
@@ -95,4 +94,4 @@ public interface RedisZSetCommands {
Long zInterStore(byte[] destKey, byte[]... sets);
Long zInterStore(byte[] destKey, Aggregate aggregate, int[] weights, byte[]... sets);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/ReturnType.java b/src/main/java/org/springframework/data/redis/connection/ReturnType.java
index 710d1465e..820c3c55d 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReturnType.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReturnType.java
@@ -18,11 +18,10 @@ package org.springframework.data.redis.connection;
import java.util.List;
/**
- * Represents a data type returned from Redis, currently used to denote the
- * expected return type of Redis scripting commands
+ * Represents a data type returned from Redis, currently used to denote the expected return type of Redis scripting
+ * commands
*
* @author Jennifer Hickey
- *
*/
public enum ReturnType {
@@ -42,16 +41,16 @@ public enum ReturnType {
VALUE;
public static ReturnType fromJavaType(Class> javaType) {
- if(javaType == null) {
+ if (javaType == null) {
return ReturnType.STATUS;
}
- if(javaType.isAssignableFrom(List.class)) {
+ if (javaType.isAssignableFrom(List.class)) {
return ReturnType.MULTI;
}
- if(javaType.isAssignableFrom(Boolean.class)) {
+ if (javaType.isAssignableFrom(Boolean.class)) {
return ReturnType.BOOLEAN;
}
- if(javaType.isAssignableFrom(Long.class)) {
+ if (javaType.isAssignableFrom(Long.class)) {
return ReturnType.INTEGER;
}
return ReturnType.VALUE;
diff --git a/src/main/java/org/springframework/data/redis/connection/SortParameters.java b/src/main/java/org/springframework/data/redis/connection/SortParameters.java
index 2c30126e2..150205d84 100644
--- a/src/main/java/org/springframework/data/redis/connection/SortParameters.java
+++ b/src/main/java/org/springframework/data/redis/connection/SortParameters.java
@@ -31,7 +31,6 @@ public interface SortParameters {
/**
* Utility class wrapping the 'LIMIT' setting.
- *
*/
static class Range {
private final long start;
@@ -59,34 +58,31 @@ public interface SortParameters {
Order getOrder();
/**
- * Indicates if the sorting is numeric (default) or alphabetical (lexicographical).
- * Can be null if nothing is specified.
+ * Indicates if the sorting is numeric (default) or alphabetical (lexicographical). Can be null if nothing is
+ * specified.
*
* @return the type of sorting
*/
Boolean isAlphabetic();
/**
- * Returns the pattern (if set) for sorting by external keys (BY ).
- * Can be null if nothing is specified.
- *
+ * Returns the pattern (if set) for sorting by external keys (BY ). Can be null if nothing is specified.
+ *
* @return BY pattern.
*/
byte[] getByPattern();
/**
- * Returns the pattern (if set) for retrieving external keys (GET ).
- * Can be null if nothing is specified.
+ * Returns the pattern (if set) for retrieving external keys (GET ). Can be null if nothing is specified.
*
* @return GET pattern.
*/
byte[][] getGetPattern();
/**
- * Returns the sorting limit (range or pagination).
- * Can be null if nothing is specified.
+ * Returns the sorting limit (range or pagination). Can be null if nothing is specified.
*
* @return sorting limit/range
*/
Range getLimit();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
index 2db7cc660..ed0a62deb 100644
--- a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
@@ -25,13 +25,13 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
/**
- * Convenience extension of {@link RedisConnection} that accepts and returns {@link String}s instead of
- * byte arrays. Uses a {@link RedisSerializer} underneath to perform the conversion.
+ * Convenience extension of {@link RedisConnection} that accepts and returns {@link String}s instead of byte arrays.
+ * Uses a {@link RedisSerializer} underneath to perform the conversion.
*
* @author Costin Leau
* @see RedisCallback
* @see RedisSerializer
- * @see StringRedisTemplate
+ * @see StringRedisTemplate
*/
public interface StringRedisConnection extends RedisConnection {
@@ -280,4 +280,4 @@ public interface StringRedisConnection extends RedisConnection {
T eval(String script, ReturnType returnType, int numKeys, String... keysAndArgs);
T evalSha(String scriptSha1, ReturnType returnType, int numKeys, String... keysAndArgs);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/Subscription.java b/src/main/java/org/springframework/data/redis/connection/Subscription.java
index 370fe1923..91e380be1 100644
--- a/src/main/java/org/springframework/data/redis/connection/Subscription.java
+++ b/src/main/java/org/springframework/data/redis/connection/Subscription.java
@@ -18,10 +18,8 @@ package org.springframework.data.redis.connection;
import java.util.Collection;
/**
- * Subscription for Redis channels. Just like the underlying {@link RedisConnection},
- * it should not be used by multiple threads.
- *
- * Note that once a subscription died, it cannot accept any more subscriptions.
+ * Subscription for Redis channels. Just like the underlying {@link RedisConnection}, it should not be used by multiple
+ * threads. Note that once a subscription died, it cannot accept any more subscriptions.
*
* @author Costin Leau
*/
@@ -60,7 +58,7 @@ public interface Subscription {
/**
* Cancels the subscription for all channels matching the given patterns.
- *
+ *
* @param patterns
*/
void pUnsubscribe(byte[]... patterns);
@@ -87,10 +85,9 @@ public interface Subscription {
MessageListener getListener();
/**
- * Indicates whether this subscription is still 'alive'
- * or not.
+ * Indicates whether this subscription is still 'alive' or not.
*
* @return true if the subscription still applies, false otherwise.
*/
boolean isAlive();
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/Converters.java b/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
index c3315945e..6cf3fbf94 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
@@ -26,9 +26,8 @@ import org.springframework.data.redis.connection.RedisZSetCommands.Tuple;
/**
* Common type converters
- *
+ *
* @author Jennifer Hickey
- *
*/
abstract public class Converters {
@@ -68,7 +67,7 @@ abstract public class Converters {
public static List toObjects(Set tuples) {
List tupleArgs = new ArrayList(tuples.size() * 2);
- for(Tuple tuple: tuples) {
+ for (Tuple tuple : tuples) {
tupleArgs.add(tuple.getScore());
tupleArgs.add(tuple.getValue());
}
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
index 0d9e27cca..6ed35c122 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
@@ -7,23 +7,17 @@ import org.springframework.core.convert.converter.Converter;
/**
* Converts a List of values of one type to a List of values of another type
- *
+ *
* @author Jennifer Hickey
- *
- * @param
- * The type of elements in the List to convert
- * @param
- * The type of elements in the converted List
+ * @param The type of elements in the List to convert
+ * @param The type of elements in the converted List
*/
public class ListConverter implements Converter, List> {
private Converter itemConverter;
/**
- *
- * @param itemConverter
- * The {@link Converter} to use for converting individual List
- * items
+ * @param itemConverter The {@link Converter} to use for converting individual List items
*/
public ListConverter(Converter itemConverter) {
this.itemConverter = itemConverter;
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
index 221f80192..42414af66 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
@@ -19,9 +19,8 @@ import org.springframework.core.convert.converter.Converter;
/**
* Converts Longs to Booleans
- *
+ *
* @author Jennifer Hickey
- *
*/
public class LongToBooleanConverter implements Converter {
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
index 73ec01377..50b48372c 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
@@ -22,25 +22,18 @@ import java.util.Map;
import org.springframework.core.convert.converter.Converter;
/**
- * Converts a Map of values of one key/value type to a Map of values of another
- * type
- *
+ * Converts a Map of values of one key/value type to a Map of values of another type
+ *
* @author Jennifer Hickey
- *
- * @param
- * The type of keys and values in the Map to convert
- * @param
- * The type of keys and values in the converted Map
+ * @param The type of keys and values in the Map to convert
+ * @param The type of keys and values in the converted Map
*/
public class MapConverter implements Converter, Map> {
private Converter itemConverter;
/**
- *
- * @param itemConverter
- * The {@link Converter} to use for converting individual Map
- * keys and values
+ * @param itemConverter The {@link Converter} to use for converting individual Map keys and values
*/
public MapConverter(Converter itemConverter) {
this.itemConverter = itemConverter;
@@ -57,8 +50,7 @@ public class MapConverter implements Converter, Map> {
results = new HashMap();
}
for (Map.Entry result : source.entrySet()) {
- results.put(itemConverter.convert(result.getKey()),
- itemConverter.convert(result.getValue()));
+ results.put(itemConverter.convert(result.getKey()), itemConverter.convert(result.getValue()));
}
return results;
}
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
index 7a922564b..78010c56d 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
@@ -23,23 +23,17 @@ import org.springframework.core.convert.converter.Converter;
/**
* Converts a Set of values of one type to a Set of values of another type
- *
+ *
* @author Jennifer Hickey
- *
- * @param
- * The type of elements in the Set to convert
- * @param
- * The type of elements in the converted Set
+ * @param The type of elements in the Set to convert
+ * @param The type of elements in the converted Set
*/
public class SetConverter implements Converter, Set> {
private Converter itemConverter;
/**
- *
- * @param itemConverter
- * The {@link Converter} to use for converting individual Set
- * items
+ * @param itemConverter The {@link Converter} to use for converting individual Set items
*/
public SetConverter(Converter itemConverter) {
this.itemConverter = itemConverter;
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
index 46d44b293..933143d5c 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
@@ -20,9 +20,8 @@ import org.springframework.data.redis.connection.DataType;
/**
* Converts Strings to {@link DataType}s
- *
+ *
* @author Jennifer Hickey
- *
*/
public class StringToDataTypeConverter implements Converter {
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
index 16be5493f..ca8d99305 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
@@ -23,9 +23,8 @@ import org.springframework.data.redis.RedisSystemException;
/**
* Converts Strings to {@link Properties}
- *
+ *
* @author Jennifer Hickey
- *
*/
public class StringToPropertiesConverter implements Converter {
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
index 1eae0fd47..a28bfe139 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
@@ -25,14 +25,11 @@ import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.FutureResult;
/**
- * Converts the results of transaction exec using a supplied Queue of {@link FutureResult}s.
- * Converts any Exception objects returned in the list as well, using the supplied Exception
- * {@link Converter}
- *
+ * Converts the results of transaction exec using a supplied Queue of {@link FutureResult}s. Converts any Exception
+ * objects returned in the list as well, using the supplied Exception {@link Converter}
+ *
* @author Jennifer Hickey
- *
- * @param
- * The type of {@link FutureResult} of the individual tx operations
+ * @param The type of {@link FutureResult} of the individual tx operations
*/
public class TransactionResultConverter implements Converter, List> {
@@ -51,9 +48,8 @@ public class TransactionResultConverter implements Converter, Li
return null;
}
if (execResults.size() != txResults.size()) {
- throw new IllegalArgumentException(
- "Incorrect number of transaction results. Expected: " + txResults.size()
- + " Actual: " + execResults.size());
+ throw new IllegalArgumentException("Incorrect number of transaction results. Expected: " + txResults.size()
+ + " Actual: " + execResults.size());
}
List convertedResults = new ArrayList();
for (Object result : execResults) {
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java
index 2313bbc5c..37bb08995 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java
@@ -92,12 +92,12 @@ public class JedisConnection implements RedisConnection {
private volatile JedisSubscription subscription;
private volatile Pipeline pipeline;
private final int dbIndex;
- private boolean convertPipelineAndTxResults=true;
+ private boolean convertPipelineAndTxResults = true;
private List>> pipelinedResults = new ArrayList>>();
private Queue>> txResults = new LinkedList>>();
private class JedisResult extends FutureResult