From 6353342022e6c7bfb06f7e64ee6a3e3a3e6687a5 Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Wed, 22 Sep 2021 08:40:54 +0300 Subject: [PATCH] refactoring --- .../connection/ClientConnectionsEntry.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/redisson/src/main/java/org/redisson/connection/ClientConnectionsEntry.java b/redisson/src/main/java/org/redisson/connection/ClientConnectionsEntry.java index 0f378d082..675eb2f90 100644 --- a/redisson/src/main/java/org/redisson/connection/ClientConnectionsEntry.java +++ b/redisson/src/main/java/org/redisson/connection/ClientConnectionsEntry.java @@ -50,7 +50,6 @@ public class ClientConnectionsEntry { private final Queue allConnections = new ConcurrentLinkedQueue<>(); private final Deque freeConnections = new ConcurrentLinkedDeque<>(); private final AsyncSemaphore freeConnectionsCounter; - private volatile Iterator iter; public enum FreezeReason {MANAGER, RECONNECT, SYSTEM} @@ -82,8 +81,6 @@ public class ClientConnectionsEntry { freeConnections.remove(c); return allConnections.remove(c); }); - - iter = freeConnections.iterator(); } public boolean isMasterForRead() { @@ -152,20 +149,6 @@ public class ClientConnectionsEntry { freeSubscribeConnectionsCounter.removeListeners(); } - public int getFreeAmount() { - return freeConnectionsCounter.getCounter(); - } - - private boolean isPolled(RedisCommand command) { - return command == null - || RedisCommands.FLUSHDB.getName().equals(command.getName()) - || RedisCommands.FLUSHALL.getName().equals(command.getName()) - || RedisCommands.BLOCKING_COMMAND_NAMES.contains(command.getName()) - || RedisCommands.BLOCKING_COMMANDS.contains(command) - || RedisCommands.PUBSUB_COMMANDS.contains(command.getName()) - || RedisCommands.SCAN_COMMANDS.contains(command.getName()); - } - public void acquireConnection(Runnable runnable, RedisCommand command) { freeConnectionsCounter.acquire(runnable); }