package org.opendaylight.controller.cluster.access.client;
import com.google.common.base.MoreObjects.ToStringHelper;
-import com.google.common.base.Preconditions;
import java.util.Optional;
import org.opendaylight.controller.cluster.access.concepts.ResponseEnvelope;
import org.slf4j.Logger;
private final T backend;
- AbstractReceivingClientConnection(final ClientActorContext context, final Long cookie, final T backend) {
- super(context, cookie, new TransmitQueue.Transmitting(targetQueueSize(backend), backend));
- this.backend = Preconditions.checkNotNull(backend);
+ // To be called by ConnectedClientConnection only.
+ AbstractReceivingClientConnection(final AbstractClientConnection<T> oldConnection, final T newBackend) {
+ super(oldConnection, newBackend, targetQueueSize(newBackend));
+ this.backend = newBackend;
}
+ // To be called by ReconnectingClientConnection only.
AbstractReceivingClientConnection(final AbstractReceivingClientConnection<T> oldConnection) {
- super(oldConnection, targetQueueSize(oldConnection.backend));
+ super(oldConnection);
this.backend = oldConnection.backend;
}