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.md.sal.common.api.data;
10 import org.eclipse.jdt.annotation.NonNullByDefault;
14 public enum LogicalDatastoreType {
16 * Logical atastore representing operational state of the system
20 * This datastore is used to describe operational state of
21 * the system and it's operation related data.
26 public org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal() {
27 return org.opendaylight.mdsal.common.api.LogicalDatastoreType.OPERATIONAL;
31 * Logical Datastore representing configuration state of the system
32 * and it's components.
35 * This datastore is used to describe intended state of
36 * the system and intended operation mode.
41 public org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal() {
42 return org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION;
47 * Convert this logical datastore type to its MD-SAL counterpart.
49 * @return MD-SAL counterpart of this type.
51 public abstract org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal();
54 * Convert MD-SAL logical datastore type to this counterpart.
56 * @param type MD-SAL counterpart of this type.
57 * @return Corresponding value in this type.
59 public static LogicalDatastoreType fromMdsal(final org.opendaylight.mdsal.common.api.LogicalDatastoreType type) {
66 throw new IllegalArgumentException("Unhandled type " + type);