From 615eedd580bb43800fe099a82f399c0539d7d43a Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 16 Dec 2015 16:13:56 +0300 Subject: [PATCH] RedissonWriteLock forceUnlock fixed --- .../java/org/redisson/RedissonWriteLock.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/main/java/org/redisson/RedissonWriteLock.java b/src/main/java/org/redisson/RedissonWriteLock.java index 9edecf8f6..b50554372 100644 --- a/src/main/java/org/redisson/RedissonWriteLock.java +++ b/src/main/java/org/redisson/RedissonWriteLock.java @@ -26,8 +26,6 @@ import org.redisson.client.protocol.RedisCommands; import org.redisson.command.CommandExecutor; import org.redisson.core.RLock; -import io.netty.util.concurrent.Future; - /** * Lock will be removed automatically if client disconnects. * @@ -112,21 +110,6 @@ public class RedissonWriteLock extends RedissonLock implements RLock { throw new UnsupportedOperationException(); } - Future forceUnlockAsync() { - cancelExpirationRenewal(); - return commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, - "if (redis.call('hdel', KEYS[1], ARGV[2]) == 1) then " + - "if (redis.call('hlen', KEYS[1]) == 1) then " + - "redis.call('del', KEYS[1]); " + - "redis.call('publish', KEYS[2], ARGV[1]); " + - "end; " + - "return 1; " + - "else " + - "return 0; " + - "end;", - Arrays.asList(getName(), getChannelName()), unlockMessage, getLockName()); - } - @Override public boolean isLocked() { String res = commandExecutor.read(getName(), StringCodec.INSTANCE, RedisCommands.HGET, getName(), "mode");