Remove (DOM)TransactionChainListener
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / PingPongTransactionChain.java
1 /*
2  * Copyright (c) 2014 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.mdsal.dom.spi;
9
10 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
11
12 /**
13  * An implementation of {@link DOMTransactionChain}, which has a very specific behavior, which some users may find
14  * surprising. If keeps the general intent of the contract, but it makes sure there are never more than two transactions
15  * allocated at any given time: one of them is being committed, and while that is happening, the other one acts as
16  * a scratch pad. Once the committing transaction completes successfully, the scratch transaction is enqueued as soon as
17  * it is ready.
18  *
19  * <p>
20  * This mode of operation means that there is no inherent isolation between the front-end transactions and transactions
21  * cannot be reasonably cancelled.
22  *
23  * <p>
24  * It furthermore means that the transactions returned by {@link #newReadOnlyTransaction()} counts as an outstanding
25  * transaction and the user may not allocate multiple read-only transactions at the same time.
26  */
27 public final class PingPongTransactionChain extends AbstractPingPongTransactionChain {
28     public PingPongTransactionChain(final DOMTransactionChain delegate) {
29         super(delegate);
30     }
31 }