2 * Copyright (c) 2014 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.sal.core.spi.data;
11 * A chain of transactions. Transactions in a chain need to be committed in
12 * sequence and each transaction must see the effects of previous transactions
13 * as if they happened. A chain makes no guarantees of atomicity, in fact
14 * transactions are committed as soon as possible.
16 * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain} instead.
18 @Deprecated(forRemoval = true)
19 public interface DOMStoreTransactionChain extends DOMStoreTransactionFactory, AutoCloseable {
22 * Create a new read only transaction which will continue the chain. The
23 * previous write transaction has to be either READY or CANCELLED.
26 * If previous write transaction was already commited to data store, new
27 * read-only transaction is same as obtained via {@link DOMStore#newReadOnlyTransaction()}
28 * and contains merged result of previous one and current state of data store.
31 * Otherwise read-only transaction presents isolated view as if previous read-write
32 * transaction was successful. State which was introduced by other transactions
33 * outside this transaction chain after creation of previous transaction is not visible.
35 * @return New transaction in the chain.
36 * @throws IllegalStateException
37 * if the previous transaction was not READY or CANCELLED, or
38 * if the chain has been closed.
41 DOMStoreReadTransaction newReadOnlyTransaction();
44 * Create a new read write transaction which will continue the chain. The
45 * previous read-write transaction has to be either COMMITED or CANCELLED.
48 * If previous write transaction was already commited to data store, new
49 * read-write transaction is same as obtained via {@link DOMStore#newReadWriteTransaction()}
50 * and contains merged result of previous one and current state of data store.
53 * Otherwise read-write transaction presents isolated view as if previous read-write
54 * transaction was successful. State which was introduced by other transactions
55 * outside this transaction chain after creation of previous transaction is not visible.
57 * @return New transaction in the chain.
58 * @throws IllegalStateException
59 * if the previous transaction was not READY or CANCELLED, or
60 * if the chain has been closed.
63 DOMStoreReadWriteTransaction newReadWriteTransaction();
66 * Create a new write-only transaction which will continue the chain. The
67 * previous read-write transaction has to be either READY or CANCELLED.
70 * @return New transaction in the chain.
71 * @throws IllegalStateException
72 * if the previous transaction was not READY or CANCELLED, or
73 * if the chain has been closed.
76 DOMStoreWriteTransaction newWriteOnlyTransaction();
79 * Closes Transaction Chain.
82 * Close method of transaction chain does not guarantee that
83 * last alocated transaction is ready or was submitted.
85 * @throws IllegalStateException If any of the outstanding created transactions was not canceled or ready.