BUG-5280: Close client history after all histories are closed
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / DOMBrokerWriteOnlyTransaction.java
1 /*
2  * Copyright (c) 2015 Huawei Technologies Co. Ltd. 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
9 package org.opendaylight.controller.cluster.databroker;
10
11 import java.util.Map;
12 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
13 import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionFactory;
14 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
15
16 public class DOMBrokerWriteOnlyTransaction extends AbstractDOMBrokerWriteTransaction<DOMStoreWriteTransaction> {
17
18     /**
19      * Constructs an instance.
20      *
21      * @param identifier identifier of transaction.
22      * @param storeTxFactories the backing transaction store factories
23      */
24     public DOMBrokerWriteOnlyTransaction(Object identifier,
25             Map<LogicalDatastoreType, ? extends DOMStoreTransactionFactory> storeTxFactories,
26             AbstractDOMTransactionFactory<?> commitImpl) {
27         super(identifier, storeTxFactories, commitImpl);
28     }
29
30     @Override
31     protected DOMStoreWriteTransaction createTransaction(LogicalDatastoreType key) {
32         return getTxFactory(key).newWriteOnlyTransaction();
33     }
34
35 }