當前位置: 首頁>>代碼示例>>Java>>正文


Java BindingCodecTree類代碼示例

本文整理匯總了Java中org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree的典型用法代碼示例。如果您正苦於以下問題:Java BindingCodecTree類的具體用法?Java BindingCodecTree怎麽用?Java BindingCodecTree使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BindingCodecTree類屬於org.opendaylight.mdsal.binding.dom.codec.api包,在下文中一共展示了BindingCodecTree類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: TableContext

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
@SuppressWarnings({ "unchecked", "rawtypes" })
TableContext(final RIBSupport tableSupport, final YangInstanceIdentifier tableId, final BindingCodecTree tree) {
    this.tableSupport = requireNonNull(tableSupport);
    this.tableId = requireNonNull(tableId);
    final BindingCodecTreeNode tableCodecContext = tree.getSubtreeCodec(tableId);
    final BindingCodecTreeNode<? extends Route> routeListCodec = tableCodecContext
        .streamChild(Routes.class)
        .streamChild(this.tableSupport.routesCaseClass())
        .streamChild(this.tableSupport.routesContainerClass())
        .streamChild(this.tableSupport.routesListClass());

    this.attributesCodec = routeListCodec.streamChild(Attributes.class)
            .createCachingCodec(this.tableSupport.cacheableAttributeObjects());
    this.reachNlriCodec = tree.getSubtreeCodec(MP_REACH_NLRI_II)
            .createCachingCodec(this.tableSupport.cacheableNlriObjects());
    this.unreachNlriCodec = tree.getSubtreeCodec(MP_UNREACH_NLRI_II)
            .createCachingCodec(this.tableSupport.cacheableNlriObjects());
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:19,代碼來源:TableContext.java

示例2: BmpRouterPeerImpl

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
private BmpRouterPeerImpl(final DOMTransactionChain domTxChain, final YangInstanceIdentifier peersYangIId,
    final PeerId peerId, final RIBExtensionConsumerContext extensions, final PeerUpNotification peerUp,
    final BindingCodecTree tree) {
    this.domTxChain = requireNonNull(domTxChain);
    this.peerId = peerId;
    this.peerYangIId = YangInstanceIdentifier.builder(peersYangIId).nodeWithKey(Peer.QNAME, PEER_ID_QNAME,
            this.peerId.getValue()).build();
    this.sentOpenCodec = tree.getSubtreeCodec(SENT_OPEN_IID);
    this.receivedOpenCodec = tree.getSubtreeCodec(RECEIVED_OPEN_IID);

    final Set<TablesKey> peerTables = setPeerTables(peerUp.getReceivedOpen());
    final DOMDataWriteTransaction wTx = this.domTxChain.newWriteOnlyTransaction();
    wTx.put(LogicalDatastoreType.OPERATIONAL, this.peerYangIId, createPeerEntry(peerUp));
    wTx.submit();
    this.prePolicyWriter = BmpRibInWriter.create(this.peerYangIId.node(PrePolicyRib.QNAME).node(BMP_TABLES_QNAME),
            this.domTxChain, extensions, peerTables, tree);
    this.postPolicyWriter = BmpRibInWriter.create(this.peerYangIId.node(PostPolicyRib.QNAME).node(BMP_TABLES_QNAME),
            this.domTxChain, extensions, peerTables, tree);
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:20,代碼來源:BmpRouterPeerImpl.java

示例3: createTableInstance

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
/**
 * Create new table instance.
 */
private static ImmutableMap.Builder<TablesKey, TableContext> createTableInstance(final Set<TablesKey> tableTypes,
        final YangInstanceIdentifier yangTableRootIId, final DOMDataWriteTransaction tx,
        final RIBExtensionConsumerContext ribExtensions, final BindingCodecTree tree) {

    final ImmutableMap.Builder<TablesKey, TableContext> tb = ImmutableMap.builder();
    for (final TablesKey k : tableTypes) {
        final RIBSupport rs = ribExtensions.getRIBSupport(k);
        if (rs == null) {
            LOG.warn("No support for table type {}, skipping it", k);
            continue;
        }
        final InstanceIdentifierBuilder idb = YangInstanceIdentifier.builder(yangTableRootIId);
        final NodeIdentifierWithPredicates key = TablesUtil.toYangTablesKey(k);
        idb.nodeWithKey(key.getNodeType(), key.getKeyValues());
        final TableContext ctx = new TableContext(rs, idb.build(), tree);
        ctx.createTable(tx);

        tx.put(LogicalDatastoreType.OPERATIONAL, ctx.getTableId().node(BMP_ATTRIBUTES_QNAME)
                .node(ATTRIBUTES_UPTODATE_FALSE.getNodeType()), ATTRIBUTES_UPTODATE_FALSE);
        LOG.debug("Created table instance {}", ctx.getTableId());
        tb.put(k, ctx);
    }
    return tb;
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:28,代碼來源:BmpRibInWriter.java

示例4: onCodecTreeUpdated

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
@Override
@SuppressWarnings("unchecked")
public void onCodecTreeUpdated(final BindingCodecTree tree) {

    @SuppressWarnings("rawtypes")
    final BindingCodecTreeNode tableCodecContext = tree.getSubtreeCodec(TABLE_BASE_II);
    final BindingCodecTreeNode<? extends Route> routeListCodec = tableCodecContext
        .streamChild(Routes.class)
        .streamChild(this.ribSupport.routesCaseClass())
        .streamChild(this.ribSupport.routesContainerClass())
        .streamChild(this.ribSupport.routesListClass());

    this.attributesCodec = routeListCodec.streamChild(Attributes.class).createCachingCodec(this.cacheableAttributes);
    this.reachNlriCodec = tree.getSubtreeCodec(MP_REACH_NLRI_II).createCachingCodec(this.ribSupport.cacheableNlriObjects());
    this.unreachNlriCodec = tree.getSubtreeCodec(MP_UNREACH_NLRI_II).createCachingCodec(this.ribSupport.cacheableNlriObjects());
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:17,代碼來源:CodecsImpl.java

示例5: getSubtreeCodec

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
@Nonnull
public Map.Entry<InstanceIdentifier<?>, BindingCodecTreeNode<?>>
        getSubtreeCodec(final YangInstanceIdentifier domIdentifier) {

    final BindingCodecTree currentCodecTree = this.codecRegistry.getCodecContext();
    final InstanceIdentifier<?> bindingPath = this.codecRegistry.fromYangInstanceIdentifier(domIdentifier);
    Preconditions.checkArgument(bindingPath != null);
    /**
     * If we are able to deserialize YANG instance identifier, getSubtreeCodec must
     * return non-null value.
     */
    final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
    return new SimpleEntry<>(bindingPath, codecContext);
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:15,代碼來源:BindingToNormalizedNodeCodec.java

示例6: BmpRibInWriter

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
private BmpRibInWriter(final YangInstanceIdentifier tablesRoot, final DOMTransactionChain chain,
        final RIBExtensionConsumerContext ribExtensions,
        final Set<TablesKey> tableTypes,  final BindingCodecTree tree) {
    this.chain = chain;
    final DOMDataWriteTransaction tx = this.chain.newWriteOnlyTransaction();
    this.tables = createTableInstance(tableTypes, tablesRoot, tx, ribExtensions, tree).build();

    LOG.debug("New RIB table {} structure installed.", tablesRoot.toString());
    tx.submit();
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:11,代碼來源:BmpRibInWriter.java

示例7: RouterSessionManager

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的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

示例8: create

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
@Override
public BindingCodecTree create(final BindingRuntimeContext context) {
    return this.codecRegistry.create(context);
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:5,代碼來源:BindingToNormalizedNodeCodec.java

示例9: createRouterPeer

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
static BmpRouterPeer createRouterPeer(final DOMTransactionChain domTxChain,
        final YangInstanceIdentifier peersYangIId, final PeerUpNotification peerUp,
        final RIBExtensionConsumerContext extensions, final BindingCodecTree tree, final PeerId peerId) {
    return new BmpRouterPeerImpl(domTxChain, peersYangIId, peerId, extensions,
            peerUp, tree);
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:7,代碼來源:BmpRouterPeerImpl.java

示例10: create

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
public static BmpRibInWriter create(@Nonnull final YangInstanceIdentifier tablesRootPath,
        @Nonnull final DOMTransactionChain chain,
        @Nonnull final RIBExtensionConsumerContext extensions, @Nonnull final Set<TablesKey> tableTypes,
        @Nonnull  final BindingCodecTree tree) {
    return new BmpRibInWriter(tablesRootPath, chain, extensions, tableTypes, tree);
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:7,代碼來源:BmpRibInWriter.java

示例11: getCodecTree

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
BindingCodecTree getCodecTree() {
    return this.tree;
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:4,代碼來源:RouterSessionManager.java

示例12: getTree

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
public BindingCodecTree getTree() {
    return this.tree;
}
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:4,代碼來源:BmpDeployerDependencies.java

示例13: onCodecTreeUpdated

import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //導入依賴的package包/類
/**
 * Called when Codec tree is updated. Implementations should
 * refresh codec context.
 *
 * @param tree BindingCodecTree
 */
void onCodecTreeUpdated(final BindingCodecTree tree);
 
開發者ID:opendaylight,項目名稱:bgpcep,代碼行數:8,代碼來源:Codecs.java


注:本文中的org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。