2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. 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.mdsal.dom.spi;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
12 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
13 import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
16 * Utility mixin interface for {@link DOMDataBroker}s which realize merging transaction chains via
17 * {@link PingPongTransactionChain}. It provides {@link #createMergingTransactionChain(DOMTransactionChainListener)}
18 * as a default method combining {@link PingPongTransactionChain} with
19 * {@link #createTransactionChain(DOMTransactionChainListener)}.
22 public interface PingPongMergingDOMDataBroker extends DOMDataBroker {
24 default DOMTransactionChain createMergingTransactionChain(final DOMTransactionChainListener listener) {
25 return new PingPongTransactionChain(this::createTransactionChain, listener);