public RFuture<List<Boolean>> executeAddAsync() { return (RFuture<List<Boolean>>)(Object)batchCommandService.executeAsync(); }
public RFuture<List<Boolean>> executeAddAsync() { return (RFuture<List<Boolean>>)(Object)batchCommandService.executeAsync(); }
public RFuture<BatchResult<?>> executeAsync(BatchOptions options) { for (Publisher<?> publisher : publishers) { publisher.subscribe(new DefaultSubscriber<Object>() { @Override public void onSubscribe(Subscription s) { s.request(1); } }); } return batchService.executeAsync(options); }
public RFuture<BatchResult<?>> executeAsync(BatchOptions options) { for (Publisher<?> publisher : publishers) { publisher.subscribe(new DefaultSubscriber<Object>() { @Override public void onSubscribe(Subscription s) { s.request(1); } }); } return batchService.executeAsync(options); }
public RFuture<BatchResult<?>> executeAsync(BatchOptions options) { for (Publisher<?> publisher : publishers) { publisher.subscribe(new DefaultSubscriber<Object>() { @Override public void onSubscribe(Subscription s) { s.request(1); } }); } return batchService.executeAsync(options); }
public RFuture<BatchResult<?>> executeAsync(BatchOptions options) { for (Publisher<?> publisher : publishers) { publisher.subscribe(new DefaultSubscriber<Object>() { @Override public void onSubscribe(Subscription s) { s.request(1); } }); } return batchService.executeAsync(options); }
public BatchResult<?> execute(BatchOptions options) { RFuture<BatchResult<?>> f = executeAsync(options); return get(f); }
public BatchResult<?> execute(BatchOptions options) { RFuture<BatchResult<?>> f = executeAsync(options); return get(f); }
@Override public RFuture<BatchResult<?>> executeAsync() { return executorService.executeAsync(BatchOptions.defaults()); }
@Override public RFuture<BatchResult<?>> executeAsync() { return executorService.executeAsync(BatchOptions.defaults()); }
public RFuture<List<?>> executeAsync() { return executeAsync(BatchOptions.defaults()); }
public RFuture<List<?>> executeAsync() { return executeAsync(BatchOptions.defaults()); }
public BatchResult<?> execute() { RFuture<BatchResult<?>> f = executeAsync(BatchOptions.defaults()); return get(f); }
public BatchResult<?> execute() { RFuture<BatchResult<?>> f = executeAsync(BatchOptions.defaults()); return get(f); }
public RFuture<Void> executeAsyncVoid() { final RedissonPromise<Void> promise = new RedissonPromise<Void>(); RFuture<BatchResult<?>> res = executeAsync(BatchOptions.defaults()); res.addListener(new FutureListener<BatchResult<?>>() { @Override public void operationComplete(Future<BatchResult<?>> future) throws Exception { if (future.isSuccess()) { promise.trySuccess(null); } else { promise.tryFailure(future.cause()); } } }); return promise; }
public RFuture<Void> executeAsyncVoid() { final RedissonPromise<Void> promise = new RedissonPromise<Void>(); RFuture<BatchResult<?>> res = executeAsync(BatchOptions.defaults()); res.addListener(new FutureListener<BatchResult<?>>() { @Override public void operationComplete(Future<BatchResult<?>> future) throws Exception { if (future.isSuccess()) { promise.trySuccess(null); } else { promise.tryFailure(future.cause()); } } }); return promise; }
RFuture<List<?>> transactionFuture = transactionExecutor.executeAsync(); transactionFuture.addListener(new FutureListener<Object>() { @Override
RFuture<List<?>> transactionFuture = transactionExecutor.executeAsync(); transactionFuture.addListener(new FutureListener<Object>() { @Override
@Override public RFuture<Void> rollbackAsync() { checkState(); CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (TransactionalOperation transactionalOperation : operations) { transactionalOperation.rollback(executorService); } final RPromise<Void> result = new RedissonPromise<Void>(); RFuture<List<?>> future = executorService.executeAsync(); future.addListener(new FutureListener<Object>() { @Override public void operationComplete(Future<Object> future) throws Exception { if (!future.isSuccess()) { result.tryFailure(new TransactionException("Unable to rollback transaction", future.cause())); return; } operations.clear(); executed.set(true); result.trySuccess(null); } }); return result; }
@Override public RFuture<Void> rollbackAsync() { checkState(); CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (TransactionalOperation transactionalOperation : operations) { transactionalOperation.rollback(executorService); } final RPromise<Void> result = new RedissonPromise<Void>(); RFuture<List<?>> future = executorService.executeAsync(); future.addListener(new FutureListener<Object>() { @Override public void operationComplete(Future<Object> future) throws Exception { if (!future.isSuccess()) { result.tryFailure(new TransactionException("Unable to rollback transaction", future.cause())); return; } operations.clear(); executed.set(true); result.trySuccess(null); } }); return result; }