*/
package org.opendaylight.controller.cluster.access.client;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import org.opendaylight.controller.cluster.access.concepts.RequestException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
ReconnectingClientConnection(final ConnectedClientConnection<T> oldConnection, final RequestException cause) {
super(oldConnection);
- this.cause = Preconditions.checkNotNull(cause);
+ this.cause = requireNonNull(cause);
+ }
+
+ @Override
+ long backendSilentTicks(final long now) {
+ // We do not want to reconnect this connection, as we need the timer to to keep running
+ return 0;
}
@Override
+ @SuppressWarnings("checkstyle:hiddenField")
ClientActorBehavior<T> lockedReconnect(final ClientActorBehavior<T> current, final RequestException cause) {
- this.cause = Preconditions.checkNotNull(cause);
- LOG.debug("Skipping reconnect of already-reconnecting connection {}", this);
+ this.cause = requireNonNull(cause);
+ LOG.warn("Skipping reconnect of already-reconnecting connection {}", this);
return current;
}