2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.databroker.actors.dds;
10 import java.util.Collection;
11 import java.util.function.BiConsumer;
12 import java.util.function.Consumer;
13 import org.opendaylight.controller.cluster.access.client.ConnectionEntry;
14 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
15 import org.opendaylight.controller.cluster.access.concepts.Request;
16 import org.opendaylight.controller.cluster.access.concepts.RequestException;
17 import org.opendaylight.controller.cluster.access.concepts.Response;
18 import org.opendaylight.yangtools.concepts.Identifiable;
20 abstract class ProxyReconnectCohort implements Identifiable<LocalHistoryIdentifier> {
22 abstract void replayRequests(Collection<ConnectionEntry> previousEntries);
24 abstract ProxyHistory finishReconnect();
26 abstract void forwardRequest(Request<?, ?> request, Consumer<Response<?, ?>> callback,
27 BiConsumer<Request<?, ?>, Consumer<Response<?, ?>>> replayTo) throws RequestException;