本文整理汇总了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);
}
示例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);
}