diff --git a/redisson/pom.xml b/redisson/pom.xml
index bdf10482f..bbcba5669 100644
--- a/redisson/pom.xml
+++ b/redisson/pom.xml
@@ -355,7 +355,7 @@
verify
- checkstyle
+ check
@@ -365,7 +365,8 @@
**/org/redisson/cache/**/*.java,
**/org/redisson/client/**/*.java,
**/org/redisson/cluster/**/*.java,
- **/org/redisson/codec/**/*.java
+ **/org/redisson/codec/**/*.java,
+ **/org/redisson/command/**/*.java
true
false
diff --git a/redisson/src/main/java/org/redisson/client/codec/BaseCodec.java b/redisson/src/main/java/org/redisson/client/codec/BaseCodec.java
index 18c261357..e89f1929e 100644
--- a/redisson/src/main/java/org/redisson/client/codec/BaseCodec.java
+++ b/redisson/src/main/java/org/redisson/client/codec/BaseCodec.java
@@ -30,7 +30,7 @@ import org.redisson.jcache.JCacheEventCodec;
*/
public abstract class BaseCodec implements Codec {
- private static final List> SKIPPED_CODECS = Arrays.asList(StringCodec.class,
+ public static final List> SKIPPED_CODECS = Arrays.asList(StringCodec.class,
ByteArrayCodec.class, LocalCachedMessageCodec.class, BitSetCodec.class, JCacheEventCodec.class);
public static Codec copy(ClassLoader classLoader, Codec codec) {
diff --git a/redisson/src/main/java/org/redisson/command/AsyncDetails.java b/redisson/src/main/java/org/redisson/command/AsyncDetails.java
index f414fd978..e8a4b1a44 100644
--- a/redisson/src/main/java/org/redisson/command/AsyncDetails.java
+++ b/redisson/src/main/java/org/redisson/command/AsyncDetails.java
@@ -15,7 +15,6 @@
*/
package org.redisson.command;
-import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.function.BiConsumer;
import org.redisson.api.RFuture;
@@ -32,8 +31,6 @@ import io.netty.util.Timeout;
public class AsyncDetails {
- static final ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue();
-
RFuture connectionFuture;
ConnectionManager connectionManager;
RPromise attemptPromise;
diff --git a/redisson/src/main/java/org/redisson/command/CommandAsyncExecutor.java b/redisson/src/main/java/org/redisson/command/CommandAsyncExecutor.java
index fe25ded99..b0604e8b1 100644
--- a/redisson/src/main/java/org/redisson/command/CommandAsyncExecutor.java
+++ b/redisson/src/main/java/org/redisson/command/CommandAsyncExecutor.java
@@ -51,13 +51,13 @@ public interface CommandAsyncExecutor {
boolean isRedissonReferenceSupportEnabled();
- RedisException convertException(RFuture RFuture);
+ RedisException convertException(RFuture future);
- boolean await(RFuture> RFuture, long timeout, TimeUnit timeoutUnit) throws InterruptedException;
+ boolean await(RFuture> future, long timeout, TimeUnit timeoutUnit) throws InterruptedException;
void syncSubscription(RFuture> future);
- V get(RFuture RFuture);
+ V get(RFuture future);
RFuture writeAsync(MasterSlaveEntry entry, Codec codec, RedisCommand command, Object... params);
diff --git a/redisson/src/main/java/org/redisson/command/CommandAsyncService.java b/redisson/src/main/java/org/redisson/command/CommandAsyncService.java
index bee00f51c..6090625fa 100644
--- a/redisson/src/main/java/org/redisson/command/CommandAsyncService.java
+++ b/redisson/src/main/java/org/redisson/command/CommandAsyncService.java
@@ -44,7 +44,6 @@ import org.redisson.api.RedissonClient;
import org.redisson.api.RedissonReactiveClient;
import org.redisson.api.RedissonRxClient;
import org.redisson.cache.LRUCacheMap;
-import org.redisson.cache.LocalCachedMessageCodec;
import org.redisson.cache.ReferenceCacheMap;
import org.redisson.client.RedisAskException;
import org.redisson.client.RedisClient;
@@ -57,8 +56,7 @@ import org.redisson.client.RedisResponseTimeoutException;
import org.redisson.client.RedisTimeoutException;
import org.redisson.client.RedisTryAgainException;
import org.redisson.client.WriteRedisConnectionException;
-import org.redisson.client.codec.BitSetCodec;
-import org.redisson.client.codec.ByteArrayCodec;
+import org.redisson.client.codec.BaseCodec;
import org.redisson.client.codec.Codec;
import org.redisson.client.codec.StringCodec;
import org.redisson.client.protocol.CommandData;
@@ -75,7 +73,6 @@ import org.redisson.connection.ConnectionManager;
import org.redisson.connection.MasterSlaveEntry;
import org.redisson.connection.NodeSource;
import org.redisson.connection.NodeSource.Redirect;
-import org.redisson.jcache.JCacheEventCodec;
import org.redisson.liveobject.core.RedissonObjectBuilder;
import org.redisson.misc.LogHelper;
import org.redisson.misc.RPromise;
@@ -167,7 +164,7 @@ public class CommandAsyncService implements CommandAsyncExecutor {
try {
int timeout = config.getTimeout() + config.getRetryInterval() * config.getRetryAttempts();
if (!future.await(timeout)) {
- ((RPromise>)future).tryFailure(new RedisTimeoutException("Subscribe timeout: (" + timeout + "ms). Increase 'subscriptionsPerConnection' and/or 'subscriptionConnectionPoolSize' parameters."));
+ ((RPromise>) future).tryFailure(new RedisTimeoutException("Subscribe timeout: (" + timeout + "ms). Increase 'subscriptionsPerConnection' and/or 'subscriptionConnectionPoolSize' parameters."));
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
@@ -517,9 +514,9 @@ public class CommandAsyncService implements CommandAsyncExecutor {
if (!keys.isEmpty()) {
Object key = keys.get(0);
if (key instanceof byte[]) {
- return writeAsync((byte[])key, StringCodec.INSTANCE, RedisCommands.SCRIPT_LOAD, script);
+ return writeAsync((byte[]) key, StringCodec.INSTANCE, RedisCommands.SCRIPT_LOAD, script);
}
- return writeAsync((String)key, StringCodec.INSTANCE, RedisCommands.SCRIPT_LOAD, script);
+ return writeAsync((String) key, StringCodec.INSTANCE, RedisCommands.SCRIPT_LOAD, script);
}
return writeAllAsync(RedisCommands.SCRIPT_LOAD, new SlotCallback() {
@@ -540,16 +537,16 @@ public class CommandAsyncService implements CommandAsyncExecutor {
return getConnectionManager().getCfg().isUseScriptCache();
}
- private static final Map shaCache = new LRUCacheMap(500, 0, 0);
+ private static final Map SHA_CACHE = new LRUCacheMap(500, 0, 0);
private String calcSHA(String script) {
- String digest = shaCache.get(script);
+ String digest = SHA_CACHE.get(script);
if (digest == null) {
try {
MessageDigest mdigest = MessageDigest.getInstance("SHA-1");
byte[] s = mdigest.digest(script.getBytes());
digest = ByteBufUtil.hexDump(s);
- shaCache.put(script, digest);
+ SHA_CACHE.put(script, digest);
} catch (Exception e) {
throw new IllegalStateException(e);
}
@@ -561,7 +558,7 @@ public class CommandAsyncService implements CommandAsyncExecutor {
List