Improve LocalProxyTransaction.doExists()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / ProxyReconnectCohort.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.databroker.actors.dds;
9
10 import java.util.Collection;
11 import java.util.function.Consumer;
12 import org.opendaylight.controller.cluster.access.client.ConnectionEntry;
13 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
14 import org.opendaylight.controller.cluster.access.concepts.RequestException;
15 import org.opendaylight.yangtools.concepts.Identifiable;
16
17 abstract class ProxyReconnectCohort implements Identifiable<LocalHistoryIdentifier> {
18
19     abstract void replayRequests(Collection<ConnectionEntry> previousEntries);
20
21     abstract ProxyHistory finishReconnect();
22
23     abstract void replayEntry(ConnectionEntry entry, Consumer<ConnectionEntry> replayTo) throws RequestException;
24
25     abstract void forwardEntry(ConnectionEntry entry, Consumer<ConnectionEntry> forwardTo) throws RequestException;
26 }