refactoring

pull/578/head^2
Nikita 9 years ago
parent ca47f12ea1
commit 984fda8295

@ -658,7 +658,7 @@ public class RedissonRemoteService implements RRemoteService {
private Future<RemoteServiceAck> tryPollAckAgainAsync(RemoteInvocationOptions optionsCopy,
final RBlockingQueue<RemoteServiceAck> responseQueue, String ackName)
throws InterruptedException {
final Promise<RemoteServiceAck> promise = ImmediateEventExecutor.INSTANCE.newPromise();
final Promise<RemoteServiceAck> promise = commandExecutor.getConnectionManager().newPromise();
Future<Boolean> ackClientsFuture = commandExecutor.evalWriteAsync(ackName, LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN,
"if redis.call('setnx', KEYS[1], 1) == 1 then "
+ "redis.call('pexpire', KEYS[1], ARGV[1]);"

@ -289,7 +289,7 @@ public class RedissonSortedSet<V> extends RedissonObject implements RSortedSet<V
@Override
public Future<Boolean> removeAsync(final V value) {
EventLoopGroup group = commandExecutor.getConnectionManager().getGroup();
final Promise<Boolean> promise = group.next().newPromise();
final Promise<Boolean> promise = newPromise();
group.execute(new Runnable() {
@Override

@ -139,7 +139,7 @@ public class ClientConnectionsEntry {
}
public Future<RedisConnection> connect() {
final Promise<RedisConnection> connectionFuture = ImmediateEventExecutor.INSTANCE.newPromise();
final Promise<RedisConnection> connectionFuture = connectionManager.newPromise();
Future<RedisConnection> future = client.connectAsync();
future.addListener(new FutureListener<RedisConnection>() {
@Override
@ -192,7 +192,7 @@ public class ClientConnectionsEntry {
}
public Future<RedisPubSubConnection> connectPubSub() {
final Promise<RedisPubSubConnection> connectionFuture = ImmediateEventExecutor.INSTANCE.newPromise();
final Promise<RedisPubSubConnection> connectionFuture = connectionManager.newPromise();
Future<RedisPubSubConnection> future = client.connectPubSubAsync();
future.addListener(new FutureListener<RedisPubSubConnection>() {
@Override

Loading…
Cancel
Save