当前位置: 首页>>代码示例>>Java>>正文


Java DataBroker.newReadWriteTransaction方法代码示例

本文整理汇总了Java中org.opendaylight.controller.md.sal.binding.api.DataBroker.newReadWriteTransaction方法的典型用法代码示例。如果您正苦于以下问题:Java DataBroker.newReadWriteTransaction方法的具体用法?Java DataBroker.newReadWriteTransaction怎么用?Java DataBroker.newReadWriteTransaction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opendaylight.controller.md.sal.binding.api.DataBroker的用法示例。


在下文中一共展示了DataBroker.newReadWriteTransaction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: verifyHAOpNode

import org.opendaylight.controller.md.sal.binding.api.DataBroker; //导入方法依赖的package包/类
public static void verifyHAOpNode(Node d1GlobalOpNode, Node d2GlobalOpNode, Node haGlobalOpNode,
                                  Node d1PsOpNode, Node d2PsOpNode, Node haPsOpNode,
                                  InstanceIdentifier<Node> haId, InstanceIdentifier<Node> d1PsId,
                                  InstanceIdentifier<Node> d2PsId, InstanceIdentifier<Node> haPsId,
                                  NodeId haNodeId, DataBroker dataBroker) throws ReadFailedException {
    ReadWriteTransaction transaction = dataBroker.newReadWriteTransaction();
    TestComparators.compareLogicalSwitches(d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode, haId);
    TestComparators.compareRemoteUcastMacs(d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode, haId);
    TestComparators.compareRemoteMcastMacs(d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode, haId);
    TestComparators.compareLocalUcastMacs(d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode, haId);
    TestComparators.compareLocalMcastMacs(d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode, haId);
    TestComparators.verifySwitches(haGlobalOpNode, haPsOpNode);
    TestComparators.verifySwitches(d1GlobalOpNode, d1PsOpNode);
    TestComparators.verifySwitches(d2GlobalOpNode, d2PsOpNode);
    TestComparators.comparePhysicalSwitches(d1PsOpNode, d2PsOpNode, haPsOpNode, d1PsId, d2PsId, haPsId,
            transaction, "s3", d1GlobalOpNode, d2GlobalOpNode, haGlobalOpNode);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:18,代码来源:TestUtil.java

示例2: updateHACacheIfHANode

import org.opendaylight.controller.md.sal.binding.api.DataBroker; //导入方法依赖的package包/类
boolean updateHACacheIfHANode(DataBroker broker, InstanceIdentifier<Node> globalNodeId)
        throws ExecutionException, InterruptedException {
    ReadWriteTransaction transaction = broker.newReadWriteTransaction();
    Node node = transaction.read(LogicalDatastoreType.OPERATIONAL, globalNodeId).get().get();
    HAOpClusteredListener.addToCacheIfHAChildNode(globalNodeId, node);
    return hwvtepHACache.isHAEnabledDevice(globalNodeId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:8,代码来源:HwvtepPhysicalSwitchListener.java


注:本文中的org.opendaylight.controller.md.sal.binding.api.DataBroker.newReadWriteTransaction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。