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


Java OvsdbTableStore.getRows方法代码示例

本文整理汇总了Java中org.onosproject.ovsdb.controller.OvsdbTableStore.getRows方法的典型用法代码示例。如果您正苦于以下问题:Java OvsdbTableStore.getRows方法的具体用法?Java OvsdbTableStore.getRows怎么用?Java OvsdbTableStore.getRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.onosproject.ovsdb.controller.OvsdbTableStore的用法示例。


在下文中一共展示了OvsdbTableStore.getRows方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBridges

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbBridge> getBridges() {
    Set<OvsdbBridge> ovsdbBridges = new HashSet<OvsdbBridge>();
    OvsdbTableStore tableStore = getTableStore(OvsdbConstant.DATABASENAME);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(OvsdbConstant.BRIDGE);
    if (rowStore == null) {
        return null;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row row = getRow(OvsdbConstant.DATABASENAME, OvsdbConstant.BRIDGE,
                         uuid);
        OvsdbBridge ovsdbBridge = getOvsdbBridge(row);
        if (ovsdbBridge != null) {
            ovsdbBridges.add(ovsdbBridge);
        }
    }
    return ovsdbBridges;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:23,代码来源:DefaultOvsdbClient.java

示例2: getPorts

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbPort> getPorts() {
    Set<OvsdbPort> ovsdbPorts = new HashSet<OvsdbPort>();
    OvsdbTableStore tableStore = getTableStore(OvsdbConstant.DATABASENAME);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(OvsdbConstant.INTERFACE);
    if (rowStore == null) {
        return null;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row row = getRow(OvsdbConstant.DATABASENAME,
                         OvsdbConstant.INTERFACE, uuid);
        OvsdbPort ovsdbPort = getOvsdbPort(row);
        if (ovsdbPort != null) {
            ovsdbPorts.add(ovsdbPort);
        }
    }
    return ovsdbPorts;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:23,代码来源:DefaultOvsdbClient.java

示例3: getBridges

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbBridge> getBridges() {
    Set<OvsdbBridge> ovsdbBridges = new HashSet<>();
    OvsdbTableStore tableStore = getTableStore(DATABASENAME);
    if (tableStore == null) {
        return ovsdbBridges;
    }
    OvsdbRowStore rowStore = tableStore.getRows(BRIDGE);
    if (rowStore == null) {
        return ovsdbBridges;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row bridgeRow = getRow(DATABASENAME, BRIDGE, uuid);
        OvsdbBridge ovsdbBridge = getOvsdbBridge(bridgeRow, Uuid.uuid(uuid));
        if (ovsdbBridge != null) {
            ovsdbBridges.add(ovsdbBridge);
        }
    }
    return ovsdbBridges;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:22,代码来源:DefaultOvsdbClient.java

示例4: getPorts

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbPort> getPorts() {
    Set<OvsdbPort> ovsdbPorts = new HashSet<>();
    OvsdbTableStore tableStore = getTableStore(DATABASENAME);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(INTERFACE);
    if (rowStore == null) {
        return null;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row row = getRow(DATABASENAME, INTERFACE, uuid);
        OvsdbPort ovsdbPort = getOvsdbPort(row);
        if (ovsdbPort != null) {
            ovsdbPorts.add(ovsdbPort);
        }
    }
    return ovsdbPorts;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:22,代码来源:DefaultOvsdbClient.java

示例5: getRow

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
/**
 * Gets the ovsdb row.
 *
 * @param dbName    the ovsdb database name
 * @param tableName the ovsdb table name
 * @param uuid      the key of the row
 * @return row, empty if row is find
 */
@Override
public Row getRow(String dbName, String tableName, String uuid) {
    OvsdbTableStore tableStore = getTableStore(dbName);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(tableName);
    if (rowStore == null) {
        return null;
    }
    return rowStore.getRow(uuid);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:21,代码来源:DefaultOvsdbClient.java

示例6: removeRow

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public void removeRow(String dbName, String tableName, String uuid) {
    OvsdbTableStore tableStore = getTableStore(dbName);
    if (tableStore == null) {
        return;
    }
    OvsdbRowStore rowStore = tableStore.getRows(tableName);
    if (rowStore == null) {
        return;
    }
    rowStore.deleteRow(uuid);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:13,代码来源:DefaultOvsdbClient.java

示例7: getLocalPorts

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbPort> getLocalPorts(Iterable<String> ifaceids) {
    Set<OvsdbPort> ovsdbPorts = new HashSet<OvsdbPort>();
    OvsdbTableStore tableStore = getTableStore(OvsdbConstant.DATABASENAME);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(OvsdbConstant.INTERFACE);
    if (rowStore == null) {
        return null;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row row = getRow(OvsdbConstant.DATABASENAME,
                         OvsdbConstant.INTERFACE, uuid);
        DatabaseSchema dbSchema = getDatabaseSchema(OvsdbConstant.DATABASENAME);
        Interface intf = (Interface) TableGenerator
                .getTable(dbSchema, row, OvsdbTable.INTERFACE);
        if (intf == null || getIfaceid(intf) == null) {
            continue;
        }
        String portName = intf.getName();
        Set<String> ifaceidSet = Sets.newHashSet(ifaceids);
        if (portName.startsWith("vxlan")
                || !ifaceidSet.contains(getIfaceid(intf))) {
            continue;
        }
        long ofPort = getOfPort(intf);
        if ((ofPort < 0) || (portName == null)) {
            continue;
        }

        OvsdbPort ovsdbPort = new OvsdbPort(new OvsdbPortNumber(ofPort),
                                            new OvsdbPortName(portName));
        if (ovsdbPort != null) {
            ovsdbPorts.add(ovsdbPort);
        }
    }
    return ovsdbPorts;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:41,代码来源:DefaultOvsdbClient.java

示例8: getLocalPorts

import org.onosproject.ovsdb.controller.OvsdbTableStore; //导入方法依赖的package包/类
@Override
public Set<OvsdbPort> getLocalPorts(Iterable<String> ifaceids) {
    Set<OvsdbPort> ovsdbPorts = new HashSet<>();
    OvsdbTableStore tableStore = getTableStore(DATABASENAME);
    if (tableStore == null) {
        return null;
    }
    OvsdbRowStore rowStore = tableStore.getRows(INTERFACE);
    if (rowStore == null) {
        return null;
    }
    ConcurrentMap<String, Row> rows = rowStore.getRowStore();
    for (String uuid : rows.keySet()) {
        Row row = getRow(DATABASENAME, INTERFACE, uuid);
        DatabaseSchema dbSchema = getDatabaseSchema(DATABASENAME);
        Interface intf = (Interface) TableGenerator
                .getTable(dbSchema, row, OvsdbTable.INTERFACE);
        if (intf == null || getIfaceid(intf) == null) {
            continue;
        }
        String portName = intf.getName();
        if (portName == null) {
            continue;
        }
        Set<String> ifaceidSet = Sets.newHashSet(ifaceids);
        if (portName.startsWith(TYPEVXLAN) || !ifaceidSet.contains(getIfaceid(intf))) {
            continue;
        }
        long ofPort = getOfPort(intf);
        if (ofPort < 0) {
            continue;
        }
        ovsdbPorts.add(new OvsdbPort(new OvsdbPortNumber(ofPort),
                                     new OvsdbPortName(portName)));
    }
    return ovsdbPorts;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:38,代码来源:DefaultOvsdbClient.java


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