本文整理汇总了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());
}
示例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);
}
示例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;
}
示例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());
}
示例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);
}
示例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();
}
示例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;
}
示例8: create
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入依赖的package包/类
@Override
public BindingCodecTree create(final BindingRuntimeContext context) {
return this.codecRegistry.create(context);
}
示例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);
}
示例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);
}
示例11: getCodecTree
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入依赖的package包/类
BindingCodecTree getCodecTree() {
return this.tree;
}
示例12: getTree
import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree; //导入依赖的package包/类
public BindingCodecTree getTree() {
return this.tree;
}
示例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);