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;
13 public enum LogicalDatastoreType {
15 * Logical atastore representing operational state of the system
19 * This datastore is used to describe operational state of
20 * the system and it's operation related data.
25 public org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal() {
26 return org.opendaylight.mdsal.common.api.LogicalDatastoreType.OPERATIONAL;
30 * Logical Datastore representing configuration state of the system
31 * and it's components.
34 * This datastore is used to describe intended state of
35 * the system and intended operation mode.
40 public org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal() {
41 return org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION;
46 * Convert this logical datastore type to its MD-SAL counterpart.
48 * @return MD-SAL counterpart of this type.
50 public abstract org.opendaylight.mdsal.common.api.LogicalDatastoreType toMdsal();
53 * Convert MD-SAL logical datastore type to this counterpart.
55 * @param type MD-SAL counterpart of this type.
56 * @return Corresponding value in this type.
58 public static LogicalDatastoreType fromMdsal(final org.opendaylight.mdsal.common.api.LogicalDatastoreType type) {
65 throw new IllegalArgumentException("Unhandled type " + type);