refactoring

pull/1124/head
Nikita 7 years ago
parent 8ffedea173
commit 7ccf53a6a4

@ -566,7 +566,7 @@ public class CommandAsyncService implements CommandAsyncExecutor {
if (details.getAttempt() == connectionManager.getConfig().getRetryAttempts()) { if (details.getAttempt() == connectionManager.getConfig().getRetryAttempts()) {
if (details.getException() == null) { if (details.getException() == null) {
details.setException(new RedisTimeoutException("Unable to send command: " + command + " with params: " + LogHelper.toString(details.getParams() + " after " + connectionManager.getConfig().getRetryAttempts() + " retry attempts"))); details.setException(new RedisTimeoutException("Unable to send command: " + command + " with params: " + LogHelper.toString(details.getParams()) + " after " + connectionManager.getConfig().getRetryAttempts() + " retry attempts"));
} }
details.getAttemptPromise().tryFailure(details.getException()); details.getAttemptPromise().tryFailure(details.getException());
return; return;
@ -712,7 +712,7 @@ public class CommandAsyncService implements CommandAsyncExecutor {
final Timeout scheduledFuture; final Timeout scheduledFuture;
if (popTimeout != 0) { if (popTimeout != 0) {
// to handle cases when connection has been lost // handling cases when connection has been lost
final Channel orignalChannel = connection.getChannel(); final Channel orignalChannel = connection.getChannel();
scheduledFuture = connectionManager.newTimeout(new TimerTask() { scheduledFuture = connectionManager.newTimeout(new TimerTask() {
@Override @Override

@ -39,7 +39,7 @@ public class RedissonExecutorBatchFuture extends RedissonPromise<Void> implement
final AtomicInteger counter = new AtomicInteger(futures.size()); final AtomicInteger counter = new AtomicInteger(futures.size());
for (RExecutorFuture<?> future : futures) { for (RExecutorFuture<?> future : futures) {
future.<Object>addListener(new FutureListener<Object>() { future.addListener(new FutureListener<Object>() {
@Override @Override
public void operationComplete(Future<Object> future) throws Exception { public void operationComplete(Future<Object> future) throws Exception {
if (!future.isSuccess()) { if (!future.isSuccess()) {

Loading…
Cancel
Save