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 * Factory for DOM Store Transactions
14 * Factory provides method to construct read-only, read-write and write-only
15 * transactions, which may be used to retrieve and modify stored information in
16 * Underlying {@link DOMStore} or {@link DOMStoreTransactionChain}.
19 * See DOMStore, DOMStoreTransactionChain for concrete variations of this factory.
22 * <b>Note:</b> This interface is used only to define common functionality
23 * between {@link DOMStore} and {@link DOMStoreTransactionChain}, which
24 * further specify behaviour of returned transactions.
26 * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionFactory} instead.
28 @Deprecated(forRemoval = true)
29 public interface DOMStoreTransactionFactory {
32 * Creates a read only transaction.
35 * Creates a new read-only transaction, which provides read access to
36 * snapshot of current state.
38 * @see DOMStoreReadTransaction for more information.
39 * @return new {@link DOMStoreReadTransaction}
40 * @throws IllegalStateException
41 * If state of factory prevents allocating new transaction.
44 DOMStoreReadTransaction newReadOnlyTransaction();
47 * Creates write only transaction.
49 * @see DOMStoreWriteTransaction for more information.
50 * @return new {@link DOMStoreWriteTransaction}
51 * @throws IllegalStateException If state of factory prevents allocating new transaction.
53 DOMStoreWriteTransaction newWriteOnlyTransaction();
56 * Creates Read-Write transaction.
58 * @see DOMStoreReadWriteTransaction for more information.
59 * @return new {@link DOMStoreWriteTransaction}
60 * @throws IllegalStateException If state of factory prevents allocating new transaction.
62 DOMStoreReadWriteTransaction newReadWriteTransaction();