refactoring

pull/5436/head
Nikita Koksharov 1 year ago
parent 68dd447835
commit 84f69e82f4

@ -217,11 +217,7 @@ public class ConfigSupport {
throw new IllegalArgumentException("server(s) address(es) not defined!");
}
if (!configCopy.isLazyInitialization()) {
try {
cm.connect();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
cm.connect();
}
return cm;
}

@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
*/
public interface ConnectionManager {
void connect() throws InterruptedException;
void connect();
PublishSubscribeService getSubscribeService();

@ -173,8 +173,6 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
try {
connect();
f.complete(null);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (Exception e) {
f.completeExceptionally(e);
lazyConnectLatch.set(null);
@ -183,7 +181,7 @@ public class MasterSlaveConnectionManager implements ConnectionManager {
}
@Override
public final void connect() throws InterruptedException {
public final void connect() {
int attempts = config.getRetryAttempts() + 1;
for (int i = 0; i < attempts; i++) {
try {

Loading…
Cancel
Save