Package org.opendaylight.genius.infra
Class Datastore
- java.lang.Object
-
- org.opendaylight.genius.infra.Datastore
-
- Direct Known Subclasses:
Datastore.Configuration
,Datastore.Operational
public abstract class Datastore extends java.lang.Object
Strongly-typed representation of a datastore (configuration or operational).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Datastore.Configuration
static class
Datastore.Operational
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<Datastore.Configuration>
CONFIGURATION
Class representing the configuration datastore.static java.lang.Class<Datastore.Operational>
OPERATIONAL
Class representing the operational datastore.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<? extends Datastore>
toClass(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType)
Returns the datastore class corresponding to the given logical datastore type.static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType
toType(java.lang.Class<? extends Datastore> datastoreClass)
Returns the logical datastore type corresponding to the given datastore class.
-
-
-
Field Detail
-
CONFIGURATION
public static final java.lang.Class<Datastore.Configuration> CONFIGURATION
Class representing the configuration datastore.
-
OPERATIONAL
public static final java.lang.Class<Datastore.Operational> OPERATIONAL
Class representing the operational datastore.
-
-
Method Detail
-
toType
public static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType toType(java.lang.Class<? extends Datastore> datastoreClass)
Returns the logical datastore type corresponding to the given datastore class.- Parameters:
datastoreClass
- The datastore class to convert.- Returns:
- The corresponding logical datastore type.
- Throws:
java.lang.IllegalArgumentException
- if the provided datastore class isn’t handled.
-
toClass
public static java.lang.Class<? extends Datastore> toClass(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType datastoreType)
Returns the datastore class corresponding to the given logical datastore type.- Parameters:
datastoreType
- The logical datastore type to convert.- Returns:
- The corresponding datastore class.
- Throws:
java.lang.IllegalArgumentException
- if the provided logical datastore type isn’t handled.
-
-