public final class DataStoreUtils extends Object
DataStoreUtils class is a collection of utility class methods
for MD-SAL datastore handling.| Modifier and Type | Method and Description |
|---|---|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
cast(Class<T> type,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
Cast the given instance identifier for the given target type.
|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
delete(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
Delete data in the MD-SAL operational datastore at the specified path.
|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
delete(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
Delete data at the specified path.
|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
read(com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<T>,org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> future)
Wait for completion of the given read transaction future, and return
data.
|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
read(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
Read data from the MD-SAL operational datastore at the given path.
|
static <T extends org.opendaylight.yangtools.yang.binding.DataObject> |
read(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
Read data from the given MD-SAL datastore at the given path.
|
public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.base.Optional<T> read(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
throws VTNException
T - Type of data to be read.rtx - A read transaction.path - An InstanceIdentifier instance which specifies
data to be read.Optional instance that contains the result.VTNException - Failed to read data.public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.base.Optional<T> read(org.opendaylight.controller.md.sal.binding.api.ReadTransaction rtx,
org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
throws VTNException
T - Type of data to be read.rtx - A read transaction.store - A LogicalDatastoreType which specifies the type
of logical datastore.path - An InstanceIdentifier instance which specifies
data to be read.Optional instance that contains the result.VTNException - Failed to read data.public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> com.google.common.base.Optional<T> read(com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<T>,org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> future)
throws VTNException
T - Type of data to be read.future - A future associated with a MD-SAL datastore read
transaction.Optional instance that contains the result.VTNException - Failed to read data.public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> T delete(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
throws VTNException
This method tries to read data at the specified path, and deletes data only if the data is present.
T - Type of data to be deleted.tx - A MD-SAL data transaction.path - An InstanceIdentifier instance which specifies
data to be deleted.null if the specified data object is not present.VTNException - Failed to read data.public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> T delete(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction tx,
org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path)
throws VTNException
This method tries to read data at the specified path, and deletes data only if the data is present.
T - Type of data to be deleted.tx - A MD-SAL data transaction.store - A LogicalDatastoreType which specifies the type
of logical datastore.path - An InstanceIdentifier instance which specifies
data to be deleted.true if data was actually deleted.
false if data is not present.VTNException - Failed to read data.public static <T extends org.opendaylight.yangtools.yang.binding.DataObject> org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> cast(Class<T> type, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
T - The type of the data targeted by the instance identifier.type - A class which indicates the target type.path - An InstanceIdentifier instance.InstanceIdentifier instance on sucecss.
null on failure.Copyright © 2018 OpenDaylight. All rights reserved.