Fix checkstyle violations in sal-dom-spi
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / DOMStoreTransactionFactory.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.controller.sal.core.spi.data;
9
10 /**
11  * Factory for DOM Store Transactions
12  *
13  * <p>
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}.
17  *
18  * <p>
19  * See DOMStore, DOMStoreTransactionChain for concrete variations of this factory.
20  *
21  * <p>
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.
25  *
26  */
27 public interface DOMStoreTransactionFactory {
28
29     /**
30      * Creates a read only transaction.
31      *
32      * <p>
33      * Creates a new read-only transaction, which provides read access to
34      * snapshot of current state.
35      *
36      * @see DOMStoreReadTransaction for more information.
37      * @return new {@link DOMStoreReadTransaction}
38      * @throws IllegalStateException
39      *             If state of factory prevents allocating new transaction.
40      *
41      */
42     DOMStoreReadTransaction newReadOnlyTransaction();
43
44     /**
45      * Creates write only transaction.
46      *
47      * @see DOMStoreWriteTransaction for more information.
48      * @return new {@link DOMStoreWriteTransaction}
49      * @throws IllegalStateException If state of factory prevents allocating new transaction.
50      */
51     DOMStoreWriteTransaction newWriteOnlyTransaction();
52
53     /**
54      * Creates Read-Write transaction.
55      *
56      * @see DOMStoreReadWriteTransaction for more information.
57      * @return  new {@link DOMStoreWriteTransaction}
58      * @throws IllegalStateException If state of factory prevents allocating new transaction.
59      */
60     DOMStoreReadWriteTransaction newReadWriteTransaction();
61
62 }