SouthboundMapper.java 文件源码

java
阅读 16 收藏 0 点赞 0 评论 0

项目:ovsdb 作者:
/**
 * Return the MD-SAL QoS type class corresponding to the QoS type {@link Qos}.
 *
 * @param type the QoS type to match {@link String}
 * @return class matching the input QoS type {@link QosTypeBase}
 */
public static  Class<? extends QosTypeBase> createQosType(String type) {
    Preconditions.checkNotNull(type);
    if (type.isEmpty()) {
        LOG.info("QoS type not supplied");
        return QosTypeBase.class;
    } else {
        ImmutableBiMap<String, Class<? extends QosTypeBase>> mapper =
                SouthboundConstants.QOS_TYPE_MAP.inverse();
        if (mapper.get(type) == null) {
            LOG.info("QoS type not found in model: {}", type);
            return QosTypeBase.class;
        } else {
            return mapper.get(type);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号