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


Java DOMDataBroker类代码示例

本文整理汇总了Java中org.opendaylight.controller.md.sal.dom.api.DOMDataBroker的典型用法代码示例。如果您正苦于以下问题:Java DOMDataBroker类的具体用法?Java DOMDataBroker怎么用?Java DOMDataBroker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DOMDataBroker类属于org.opendaylight.controller.md.sal.dom.api包,在下文中一共展示了DOMDataBroker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createProxyImpl

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
private static Object createProxyImpl(final ServiceReference<?> ref,
        final BrokerService service) {

    if (service instanceof DOMDataBroker) {
        return createProxyImpl(ref, (DOMDataBroker) service);
    } else if (service instanceof SchemaService) {
        return createProxyImpl(ref, (SchemaService) service);
    } else if (service instanceof DOMMountPointService) {
        return createProxyImpl(ref, (DOMMountPointService) service);
    } else if (service != null) {
        return createProxyImplFallback(ref, service);
    } else {
        throw new IllegalArgumentException("Unhandled parameter types: "
                + Arrays.<Object> asList(ref, service).toString());
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:17,代码来源:ProxyFactory.java

示例2: TracingBroker

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public TracingBroker(DOMDataBroker delegate, Config config, BindingNormalizedNodeSerializer codec) {
    this.delegate = Objects.requireNonNull(delegate);
    this.codec = Objects.requireNonNull(codec);
    configure(config);

    if (config.isTransactionDebugContextEnabled() != null) {
        this.isDebugging = config.isTransactionDebugContextEnabled();
    } else {
        this.isDebugging = false;
    }
    final String db = "DataBroker";
    this.transactionChainsRegistry     = new CloseTrackedRegistry<>(db, "createTransactionChain()", isDebugging);
    this.readOnlyTransactionsRegistry  = new CloseTrackedRegistry<>(db, "newReadOnlyTransaction()", isDebugging);
    this.writeTransactionsRegistry     = new CloseTrackedRegistry<>(db, "newWriteOnlyTransaction()", isDebugging);
    this.readWriteTransactionsRegistry = new CloseTrackedRegistry<>(db, "newReadWriteTransaction()", isDebugging);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:17,代码来源:TracingBroker.java

示例3: SimpletxDomRead

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public SimpletxDomRead(final DOMDataBroker domDataBroker, final int outerListElem,
                       final int innerListElem, final long writesPerTx, final DataStore dataStore) {
    super(StartTestInput.Operation.DELETE, outerListElem, innerListElem, writesPerTx, dataStore);
    this.domDataBroker = domDataBroker;
    LOG.debug("Created simpleTxDomRead");

}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:SimpletxDomRead.java

示例4: testPrintOpenTransactions

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
@Test
@SuppressWarnings({ "resource", "unused" }) // Finding resource leaks is the point of this test
public void testPrintOpenTransactions() {
    DOMDataBroker domDataBroker = mock(DOMDataBroker.class, RETURNS_DEEP_STUBS);
    Config config = new ConfigBuilder().setTransactionDebugContextEnabled(true).build();
    BindingNormalizedNodeSerializer codec = mock(BindingNormalizedNodeSerializer.class);
    TracingBroker tracingBroker = new TracingBroker(domDataBroker, config, codec);

    DOMDataReadWriteTransaction tx = tracingBroker.newReadWriteTransaction();
    DOMTransactionChain txChain = tracingBroker.createTransactionChain(null);
    DOMDataReadWriteTransaction txFromChain = txChain.newReadWriteTransaction();

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintStream ps = new PrintStream(baos);
    boolean printReturnValue = tracingBroker.printOpenTransactions(ps);
    String output = new String(baos.toByteArray(), UTF_8);

    assertThat(printReturnValue).isTrue();
    // Assert expections about stack trace
    assertThat(output).contains("testPrintOpenTransactions(TracingBrokerTest.java");
    assertThat(output).doesNotContain(TracingBroker.class.getName());

    String previousLine = "";
    for (String line : output.split("\n")) {
        if (line.contains("(...")) {
            assertThat(previousLine.contains("(...)")).isFalse();
        }
        previousLine = line;
    }

    // We don't do any verify/times on the mocks,
    // because the main point of the test is just to verify that
    // printOpenTransactions runs through without any exceptions
    // (e.g. it used to have a ClassCastException).
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:36,代码来源:TracingBrokerTest.java

示例5: createInstance

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
@Override
public AutoCloseable createInstance() {
    // The ConcurrentDOMDataBroker is provided via blueprint so wait for and return it here for
    // backwards compatibility.
    WaitingServiceTracker<DOMDataBroker> tracker = WaitingServiceTracker.create(
            DOMDataBroker.class, bundleContext, "(type=default)");
    DOMDataBroker delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
    return new ForwardingConcurrentDOMBroker(delegate, tracker);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:10,代码来源:DomConcurrentDataBrokerModule.java

示例6: BindingDOMTransactionChainAdapter

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public BindingDOMTransactionChainAdapter(final DOMDataBroker chainFactory,
        final BindingToNormalizedNodeCodec codec, final TransactionChainListener listener) {
    Preconditions.checkNotNull(chainFactory, "DOM Transaction chain factory must not be null");
    this.domListener = new DelegateChainListener();
    this.bindingListener = listener;
    this.delegate = chainFactory.createTransactionChain(domListener);
    this.codec = codec;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:9,代码来源:BindingDOMTransactionChainAdapter.java

示例7: BindingDOMDataBrokerAdapter

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public BindingDOMDataBrokerAdapter(final DOMDataBroker domDataBroker, final BindingToNormalizedNodeCodec codec) {
    super(domDataBroker, codec);
    final DOMDataTreeChangeService domTreeChange = (DOMDataTreeChangeService) domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);
    if(domTreeChange != null) {
        treeChangeService = BindingDOMDataTreeChangeServiceAdapter.create(codec, domTreeChange);
    } else {
        treeChangeService = null;
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:10,代码来源:BindingDOMDataBrokerAdapter.java

示例8: MdsalLowLevelTestProvider

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public MdsalLowLevelTestProvider(final RpcProviderRegistry rpcRegistry,
                                 final DOMRpcProviderService domRpcService,
                                 final ClusterSingletonServiceProvider singletonService,
                                 final SchemaService schemaService,
                                 final BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer,
                                 final NotificationPublishService notificationPublishService,
                                 final NotificationService notificationService,
                                 final DOMDataBroker domDataBroker,
                                 final DOMDataTreeService domDataTreeService,
                                 final DistributedShardFactory distributedShardFactory,
                                 final DistributedDataStoreInterface configDataStore,
                                 final ActorSystemProvider actorSystemProvider) {
    this.rpcRegistry = rpcRegistry;
    this.domRpcService = domRpcService;
    this.singletonService = singletonService;
    this.schemaService = schemaService;
    this.bindingNormalizedNodeSerializer = bindingNormalizedNodeSerializer;
    this.notificationPublishService = notificationPublishService;
    this.notificationService = notificationService;
    this.domDataBroker = domDataBroker;
    this.domDataTreeService = domDataTreeService;
    this.distributedShardFactory = distributedShardFactory;
    this.configDataStore = configDataStore;
    this.actorSystem = actorSystemProvider.getActorSystem();

    this.prefixLeaderHandler = new PrefixLeaderHandler(domDataTreeService, bindingNormalizedNodeSerializer);

    domDataTreeChangeService =
            (DOMDataTreeChangeService) domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);

    registration = rpcRegistry.addRpcImplementation(OdlMdsalLowlevelControlService.class, this);

    prefixShardHandler = new PrefixShardHandler(distributedShardFactory, domDataTreeService,
            bindingNormalizedNodeSerializer);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:36,代码来源:MdsalLowLevelTestProvider.java

示例9: AmqpUserAgentFactory

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public AmqpUserAgentFactory(final DOMDataBroker broker, final DOMNotificationService domNotification) {
    this.dataBroker = Preconditions.checkNotNull(broker, "broker");
    this.notificationService = Preconditions.checkNotNull(domNotification, "domNotification");

    if (LOG.isDebugEnabled()) {
        AmqpPublisher.publish("Messaging4Transport Initiation with External Broker Successful");
    }

    amqpAgentsConfigReg = null;
    //  broker.registerDataTreeChangeListener(AGENT_CONFIG_PATH, this);
    // todo - 1: registerDataChangeListener
}
 
开发者ID:opendaylight,项目名称:messaging4transport,代码行数:13,代码来源:AmqpUserAgentFactory.java

示例10: createInstance

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
@Override
public java.lang.AutoCloseable createInstance() {
    final DOMDataBroker dataBroker = getDomBrokerDependency()
            .registerConsumer(new NoopDOMConsumer()).getService(DOMDataBroker.class);
    final DOMNotificationService notifyService = getDomBrokerDependency()
            .registerConsumer(new NoopDOMConsumer())
            .getService(DOMNotificationService.class);
    return new AmqpUserAgentFactory(dataBroker, notifyService);
}
 
开发者ID:opendaylight,项目名称:messaging4transport,代码行数:10,代码来源:Messaging4TransportModule.java

示例11: RouterSessionManager

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
RouterSessionManager(final YangInstanceIdentifier yangMonitorId, final DOMDataBroker domDataBroker,
        final RIBExtensionConsumerContext extensions, final BindingCodecTree tree) {
    this.domDataBroker = domDataBroker;
    this.yangRoutersId = YangInstanceIdentifier.builder(yangMonitorId).node(Router.QNAME).build();
    this.extensions = extensions;
    this.tree = tree;
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:8,代码来源:RouterSessionManager.java

示例12: BmpDeployerDependencies

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public BmpDeployerDependencies(final DataBroker dataBroker, final DOMDataBroker domDataBroker,
        final RIBExtensionConsumerContext extensions, final BindingCodecTreeFactory codecTreeFactory,
        final SchemaContext schemaContext, final ClusterSingletonServiceProvider singletonProvider) {
    this.dataBroker = requireNonNull(dataBroker);
    this.domDataBroker = requireNonNull(domDataBroker);
    this.extensions = requireNonNull(extensions);
    this.tree = requireNonNull(codecTreeFactory).create(schemaContext);
    this.singletonProvider = requireNonNull(singletonProvider);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:10,代码来源:BmpDeployerDependencies.java

示例13: RIBImpl

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public RIBImpl(final RibId ribId, final AsNumber localAs, final BgpId localBgpId,
        final ClusterIdentifier clusterId, final RIBExtensionConsumerContext extensions, final BGPDispatcher dispatcher,
        final BindingCodecTreeFactory codecFactory, final DOMDataBroker domDataBroker, final List<BgpTableType> localTables,
        @Nonnull final Map<TablesKey, PathSelectionMode> bestPathSelectionStrategies, final GeneratedClassLoadingStrategy classStrategy) {
    super(InstanceIdentifier.create(BgpRib.class).child(Rib.class, new RibKey(requireNonNull(ribId))),
            localBgpId, localAs);
    this.localAs = requireNonNull(localAs);
    this.bgpIdentifier = requireNonNull(localBgpId);
    this.dispatcher = requireNonNull(dispatcher);
    this.localTables = ImmutableSet.copyOf(localTables);
    this.localTablesKeys = new HashSet<>();
    this.domDataBroker = requireNonNull(domDataBroker);
    this.service = this.domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);
    this.extensions = requireNonNull(extensions);
    this.codecsRegistry = CodecsRegistryImpl.create(codecFactory, classStrategy);
    this.ribContextRegistry = RIBSupportContextRegistryImpl.create(extensions, this.codecsRegistry);
    final InstanceIdentifierBuilder yangRibIdBuilder = YangInstanceIdentifier.builder().node(BgpRib.QNAME).node(Rib.QNAME);
    this.yangRibId = yangRibIdBuilder.nodeWithKey(Rib.QNAME, RIB_ID_QNAME, ribId.getValue()).build();
    this.bestPathSelectionStrategies = requireNonNull(bestPathSelectionStrategies);
    final ClusterIdentifier cId = clusterId == null ? new ClusterIdentifier(localBgpId) : clusterId;
    this.ribId = ribId;
    final PolicyDatabase policyDatabase = new PolicyDatabase(this.localAs.getValue(), localBgpId, cId);
    this.importPolicyPeerTracker = new ImportPolicyPeerTrackerImpl(policyDatabase);

    final ImmutableMap.Builder<TablesKey, ExportPolicyPeerTracker> exportPolicies = new ImmutableMap.Builder<>();
    for (final BgpTableType t : this.localTables) {
        final TablesKey key = new TablesKey(t.getAfi(), t.getSafi());
        this.localTablesKeys.add(key);
        exportPolicies.put(key, new ExportPolicyPeerTrackerImpl(policyDatabase, key));
    }
    this.exportPolicyPeerTrackerMap = exportPolicies.build();
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:33,代码来源:RIBImpl.java

示例14: RibImpl

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public RibImpl(final RIBExtensionConsumerContext contextProvider, final BGPDispatcher dispatcher,
        final BindingCodecTreeFactory codecTreeFactory, final DOMDataBroker domBroker,
        final DOMSchemaService domSchemaService) {
    this.extensions = contextProvider;
    this.dispatcher = dispatcher;
    this.codecTreeFactory = codecTreeFactory;
    this.domBroker = domBroker;
    this.domSchemaService = domSchemaService;
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:10,代码来源:RibImpl.java

示例15: TxchainDomDelete

import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; //导入依赖的package包/类
public TxchainDomDelete(final DOMDataBroker domDataBroker, final int outerListElem, final int innerListElem,
        final long writesPerTx, final DataStore dataStore) {
    super(StartTestInput.Operation.DELETE, outerListElem, innerListElem, writesPerTx, dataStore);
    this.domDataBroker = domDataBroker;
    LOG.debug("Created TxchainDomDelete");
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:7,代码来源:TxchainDomDelete.java


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