From 7b060790f5f598763b8444e0a92d72c269b84930 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Tue, 8 Sep 2020 08:52:25 +0300 Subject: [PATCH] compilation fixed --- .../RedissonTransactionalBuckets.java | 93 ++++++++++--------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/redisson/src/main/java/org/redisson/transaction/RedissonTransactionalBuckets.java b/redisson/src/main/java/org/redisson/transaction/RedissonTransactionalBuckets.java index 5f0014f80..d6dd74ebf 100644 --- a/redisson/src/main/java/org/redisson/transaction/RedissonTransactionalBuckets.java +++ b/redisson/src/main/java/org/redisson/transaction/RedissonTransactionalBuckets.java @@ -137,52 +137,53 @@ public class RedissonTransactionalBuckets extends RedissonBuckets { return result; } - @Override - public RFuture deleteAsync(String... keys) { - checkState(); - RPromise result = new RedissonPromise<>(); - long threadId = Thread.currentThread().getId(); - executeLocked(result, new Runnable() { - @Override - public void run() { - AtomicLong counter = new AtomicLong(); - AtomicLong executions = new AtomicLong(keys.length); - for (String key : keys) { - Object st = state.get(key); - if (st != null) { - operations.add(new DeleteOperation(key, getLockName(key), transactionId, threadId)); - if (st != NULL) { - state.put(key, NULL); - counter.incrementAndGet(); - } - if (executions.decrementAndGet() == 0) { - result.trySuccess(counter.get()); - } - continue; - } - - RedissonKeys ks = new RedissonKeys(commandExecutor); - ks.countExistsAsync(key).onComplete((res, e) -> { - if (e != null) { - result.tryFailure(e); - return; - } - - if (res > 0) { - operations.add(new DeleteOperation(key, getLockName(key), transactionId, threadId)); - state.put(key, NULL); - counter.incrementAndGet(); - } - - if (executions.decrementAndGet() == 0) { - result.trySuccess(counter.get()); - } - }); - } - } - }, Arrays.asList(keys)); - return result; - } +// Add RKeys.deleteAsync support +// +// public RFuture deleteAsync(String... keys) { +// checkState(); +// RPromise result = new RedissonPromise<>(); +// long threadId = Thread.currentThread().getId(); +// executeLocked(result, new Runnable() { +// @Override +// public void run() { +// AtomicLong counter = new AtomicLong(); +// AtomicLong executions = new AtomicLong(keys.length); +// for (String key : keys) { +// Object st = state.get(key); +// if (st != null) { +// operations.add(new DeleteOperation(key, getLockName(key), transactionId, threadId)); +// if (st != NULL) { +// state.put(key, NULL); +// counter.incrementAndGet(); +// } +// if (executions.decrementAndGet() == 0) { +// result.trySuccess(counter.get()); +// } +// continue; +// } +// +// RedissonKeys ks = new RedissonKeys(commandExecutor); +// ks.countExistsAsync(key).onComplete((res, e) -> { +// if (e != null) { +// result.tryFailure(e); +// return; +// } +// +// if (res > 0) { +// operations.add(new DeleteOperation(key, getLockName(key), transactionId, threadId)); +// state.put(key, NULL); +// counter.incrementAndGet(); +// } +// +// if (executions.decrementAndGet() == 0) { +// result.trySuccess(counter.get()); +// } +// }); +// } +// } +// }, Arrays.asList(keys)); +// return result; +// } @Override public RFuture trySetAsync(Map buckets) {