本文整理汇总了Java中org.opendaylight.controller.md.sal.binding.api.DataObjectModification.getModifiedAugmentation方法的典型用法代码示例。如果您正苦于以下问题:Java DataObjectModification.getModifiedAugmentation方法的具体用法?Java DataObjectModification.getModifiedAugmentation怎么用?Java DataObjectModification.getModifiedAugmentation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.controller.md.sal.binding.api.DataObjectModification
的用法示例。
在下文中一共展示了DataObjectModification.getModifiedAugmentation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChildMod
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; //导入方法依赖的package包/类
@Override
protected Map<InstanceIdentifier<LocalUcastMacs>, DataObjectModification<LocalUcastMacs>> getChildMod(
final InstanceIdentifier<Node> parentIid,
final DataObjectModification<Node> mod) {
Map<InstanceIdentifier<LocalUcastMacs>, DataObjectModification<LocalUcastMacs>> result = new HashMap<>();
DataObjectModification<HwvtepGlobalAugmentation> aug = mod.getModifiedAugmentation(
HwvtepGlobalAugmentation.class);
if (aug != null && getModificationType(aug) != null) {
Collection<DataObjectModification<? extends DataObject>> children = aug.getModifiedChildren();
children.stream()
.filter(childMod -> getModificationType(childMod) != null)
.filter(childMod -> childMod.getDataType() == LocalUcastMacs.class)
.forEach(childMod -> {
LocalUcastMacs afterMac = (LocalUcastMacs) childMod.getDataAfter();
LocalUcastMacs mac = afterMac != null ? afterMac : (LocalUcastMacs)childMod.getDataBefore();
InstanceIdentifier<LocalUcastMacs> iid = parentIid
.augmentation(HwvtepGlobalAugmentation.class)
.child(LocalUcastMacs.class, mac.getKey());
result.put(iid, (DataObjectModification<LocalUcastMacs>) childMod);
});
}
return result;
}
示例2: extractDataChanged
import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; //导入方法依赖的package包/类
private void extractDataChanged(final InstanceIdentifier<Node> key,
final DataObjectModification<Node> mod,
final Map<Class<? extends Identifiable>, List<Identifiable>> updatedData,
final Map<Class<? extends Identifiable>, List<Identifiable>> deletedData) {
extractDataChanged(mod.getModifiedChildren(), updatedData, deletedData);
DataObjectModification<HwvtepGlobalAugmentation> aug = mod.getModifiedAugmentation(
HwvtepGlobalAugmentation.class);
if (aug != null && getModificationType(aug) != null) {
extractDataChanged(aug.getModifiedChildren(), updatedData, deletedData);
}
DataObjectModification<PhysicalSwitchAugmentation> psAug = mod.getModifiedAugmentation(
PhysicalSwitchAugmentation.class);
if (psAug != null && getModificationType(psAug) != null) {
extractDataChanged(psAug.getModifiedChildren(), updatedData, deletedData);
}
}