a67b7ed3be27bdd629f3105ad62d7650359f5d3a
[controller.git] / opendaylight / md-sal / cds-access-client / src / main / java / org / opendaylight / controller / cluster / access / client / ReconnectingClientConnection.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.access.client;
9
10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory;
12
13 /**
14  * An {@link AbstractClientConnection} which is being reconnected after having timed out.
15  *
16  * @author Robert Varga
17  *
18  * @param <T> {@link BackendInfo} type
19  */
20 public final class ReconnectingClientConnection<T extends BackendInfo> extends AbstractReceivingClientConnection<T> {
21     private static final Logger LOG = LoggerFactory.getLogger(ReconnectingClientConnection.class);
22
23     ReconnectingClientConnection(final ConnectedClientConnection<T> oldConnection) {
24         super(oldConnection);
25     }
26
27     @Override
28     ClientActorBehavior<T> reconnectConnection(final ClientActorBehavior<T> current) {
29         // Intentional no-op
30         LOG.debug("Skipping reconnect of already-reconnecting connection {}", this);
31         return current;
32     }
33 }