Rename DOMDataTreeChangeService
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / PingPongMergingDOMDataBroker.java
1 /*
2  * Copyright (c) 2019 PANTHEON.tech, s.r.o. 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.mdsal.dom.spi;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
12 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
13
14 /**
15  * Utility mixin interface for {@link DOMDataBroker}s which realize merging transaction chains via
16  * {@link PingPongTransactionChain}. It provides {@link #createMergingTransactionChain()}
17  * as a default method combining {@link PingPongTransactionChain} with {@link #createTransactionChain()}.
18  */
19 @Beta
20 public interface PingPongMergingDOMDataBroker extends DOMDataBroker {
21     @Override
22     default DOMTransactionChain createMergingTransactionChain() {
23         return new PingPongTransactionChain(createTransactionChain());
24     }
25 }