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); }