MDSAL-API Migration
[genius.git] / mdsalutil / mdsalutil-api / src / main / java / org / opendaylight / genius / infra / TypedTransaction.java
1 /*
2  * Copyright © 2018 Red Hat, Inc. and others.
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.genius.infra;
9
10 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
11
12 abstract class TypedTransaction<D extends Datastore> {
13     // Temporarily package protected for TransactionAdapter
14     final LogicalDatastoreType datastoreType;
15
16     TypedTransaction(Class<D> datastoreType) {
17         this.datastoreType = Datastore.toType(datastoreType);
18     }
19
20     LogicalDatastoreType getDatastoreType() {
21         return this.datastoreType;
22     }
23 }